mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
chore: fix some comments
Signed-off-by: haouvw <jchaodaohang@foxmail.com>
This commit is contained in:
@@ -522,7 +522,7 @@ export class DependenciesScanner {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public insertExportedProvider(
|
public insertExportedProvider(
|
||||||
// TODO: improve the type definition bellow because it doesn't reflects the real usage of this method
|
// TODO: improve the type definition below because it doesn't reflects the real usage of this method
|
||||||
exportedProvider: Type<Injectable> | ForwardReference,
|
exportedProvider: Type<Injectable> | ForwardReference,
|
||||||
token: string,
|
token: string,
|
||||||
) {
|
) {
|
||||||
|
|||||||
@@ -382,7 +382,7 @@ data: test
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
// Can't access to the internal sseStream,
|
// Can't access to the internal sseStream,
|
||||||
// as a workround, set `defaultMaxListeners` of `SseStream` and reset the max listeners of `process`
|
// as a workaround, set `defaultMaxListeners` of `SseStream` and reset the max listeners of `process`
|
||||||
const PROCESS_MAX_LISTENERS = process.getMaxListeners();
|
const PROCESS_MAX_LISTENERS = process.getMaxListeners();
|
||||||
SseStream.defaultMaxListeners = MAX_LISTENERS;
|
SseStream.defaultMaxListeners = MAX_LISTENERS;
|
||||||
process.setMaxListeners(PROCESS_MAX_LISTENERS);
|
process.setMaxListeners(PROCESS_MAX_LISTENERS);
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ async function bootstrap() {
|
|||||||
const appService = app.get(AppService);
|
const appService = app.get(AppService);
|
||||||
console.log('AppService#getHello:', appService.getHello());
|
console.log('AppService#getHello:', appService.getHello());
|
||||||
|
|
||||||
// Note that bellow we can't use `app.select(MyDynamicModule)` otherwise we would get an error as the static version of `MyDynamicModule` was not imported anywhere
|
// Note that below we can't use `app.select(MyDynamicModule)` otherwise we would get an error as the static version of `MyDynamicModule` was not imported anywhere
|
||||||
const myDynamicProviderValue = app
|
const myDynamicProviderValue = app
|
||||||
.select(dynamicModule)
|
.select(dynamicModule)
|
||||||
.get('MyDynamicProvider');
|
.get('MyDynamicProvider');
|
||||||
|
|||||||
Reference in New Issue
Block a user