Complete the code to define a custom provider token.
const MY_SERVICE = '[1]';
The token MyServiceToken is a common pattern to identify a custom provider uniquely.
Complete the code to provide a custom class provider in NestJS.
providers: [{ provide: MY_SERVICE, use[1]: MyServiceClass }]The useClass key tells NestJS to use the given class as the provider implementation.
Fix the error in the custom provider definition by completing the blank.
providers: [{ provide: MY_SERVICE, use[1]: () => new MyService() }]When providing a factory function, the correct key is useFactory.
Fill both blanks to create a custom provider that uses a value.
providers: [{ provide: [1], use[2]: { name: 'Test' } }]Use MY_SERVICE as the token and useValue to provide a fixed value.
Fill all three blanks to create a factory provider with dependencies.
providers: [{ provide: [1], use[2]: (dep) => new MyService(dep), inject: [[3]] }]The token is MY_SERVICE, the key for factory is useFactory, and the dependency injected is DependencyService.
