Skip to content

Commit 43c0414

Browse files
committed
fix: remove unused
1 parent df8fa93 commit 43c0414

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

index.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ import { APP_INTERCEPTOR, ModuleRef, ContextIdFactory } from '@nestjs/core';
1010
import { GqlExecutionContext } from '@nestjs/graphql';
1111
import * as DataLoader from 'dataloader';
1212
import { Observable } from 'rxjs';
13-
import { idText } from 'typescript';
1413

1514
/**
16-
* This interface will be used to generate the initial data loader.      
15+
* This interface will be used to generate the initial data loader.      
1716
* The concrete implementation should be added as a provider to your module.
1817
*/
1918
export interface NestDataLoader<ID, Type> {
@@ -48,8 +47,8 @@ export class DataLoaderInterceptor implements NestInterceptor {
4847
contextId: ContextIdFactory.create(),
4948
getLoader: (type: string) : Promise<NestDataLoader<any, any>> => {
5049
if (ctx[type] === undefined) {
51-
try {
52-
ctx[type] = (async () => {
50+
try {
51+
ctx[type] = (async () => {
5352
return (await this.moduleRef.resolve<NestDataLoader<any, any>>(type, ctx[NEST_LOADER_CONTEXT_KEY].contextId, { strict: false }))
5453
.generateDataLoader();
5554
})();

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"outDir": "./dist",
1111
"baseUrl": "./",
1212
"esModuleInterop": true,
13+
"noUnusedLocals": true
1314
},
1415
"exclude": ["node_modules", "dist", "example"]
1516
}

0 commit comments

Comments
 (0)