()
| 26 | } |
| 27 | |
| 28 | export async function main() { |
| 29 | const ctx = new Context('invocation-context'); |
| 30 | ctx.bind(CURRENT_USER).to('John'); |
| 31 | ctx.bind('greeter').toClass(Greeter); |
| 32 | const greeter = await ctx.get<Greeter>('greeter'); |
| 33 | console.log(greeter.hello()); |
| 34 | } |
| 35 | |
| 36 | if (require.main === module) { |
| 37 | main().catch(err => { |