diff --git a/types/nunjucks/index.d.ts b/types/nunjucks/index.d.ts index e8e654a1de..d307bd27d5 100644 --- a/types/nunjucks/index.d.ts +++ b/types/nunjucks/index.d.ts @@ -61,7 +61,7 @@ export class Environment { autoescape: boolean; }; - constructor(loader?: ILoader | ILoader[], opts?: ConfigureOptions); + constructor(loader?: ILoader | ILoader[] | null, opts?: ConfigureOptions); render(name: string, context?: object): string; render(name: string, context?: object, callback?: (err: any, res: string) => any): void; diff --git a/types/nunjucks/tsconfig.json b/types/nunjucks/tsconfig.json index 39cf9bfbca..5824ce2f1f 100644 --- a/types/nunjucks/tsconfig.json +++ b/types/nunjucks/tsconfig.json @@ -6,7 +6,7 @@ ], "noImplicitAny": true, "noImplicitThis": true, - "strictNullChecks": false, + "strictNullChecks": true, "strictFunctionTypes": true, "baseUrl": "../", "typeRoots": [ @@ -20,4 +20,4 @@ "index.d.ts", "nunjucks-tests.ts" ] -} \ No newline at end of file +}