Skip to content

Commit

Permalink
🤖 Merge PR DefinitelyTyped#63968 [Nunjucks] Add dev argument to `Co…
Browse files Browse the repository at this point in the history
…nfigureOptions` by @pezholio

There is an undocumented `dev` argument that can be sent to
`nunjucks.configure`, which allows a full error trace to the thrown

(See: mozilla/nunjucks#1430)
  • Loading branch information
pezholio authored and miccehedin committed Feb 15, 2023
1 parent b64b54b commit 79788ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions types/nunjucks/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export interface ConfigureOptions {
lstripBlocks?: boolean | undefined;
watch?: boolean | undefined;
noCache?: boolean | undefined;
dev?: boolean | undefined;
web?:
| {
useCache?: boolean | undefined;
Expand Down
2 changes: 2 additions & 0 deletions types/nunjucks/nunjucks-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ nunjucks.configure('views', {
autoescape: true,
watch: true,
});
nunjucks.configure({ dev: true });
rendered = env.renderString(src, ctx);

env.on('load', (name, source, loader) => {});
Expand All @@ -40,6 +41,7 @@ let extension: nunjucks.Extension = {
return 'The parser api is complicated';
},
};

env = env.addExtension('SpawnGlitter', extension);
const hasExtension: boolean = env.hasExtension('SpawnGlitter');
extension = env.getExtension('SpawnGlitter');
Expand Down

0 comments on commit 79788ef

Please sign in to comment.