()
| 65 | } |
| 66 | |
| 67 | export async function main() { |
| 68 | const ctx = new Context('request'); |
| 69 | // Bind `GREETER` to a class from which the value is instantiated |
| 70 | ctx.bind(GREETER).toClass(Greeter); |
| 71 | |
| 72 | // Now try to invoke a greeter with synchronous resolution of the current user |
| 73 | await greetWithSyncUser(ctx); |
| 74 | |
| 75 | // Then try to invoke a greeter with asynchronous resolution of the current user |
| 76 | await greetWithAsyncUser(ctx); |
| 77 | } |
| 78 | |
| 79 | if (require.main === module) { |
| 80 | main().catch(err => { |
no test coverage detected