Skip to content

Commit

Permalink
feat(tsconfig): add ngDevMode type
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Nov 25, 2023
1 parent 97e53c3 commit e32cabe
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions projects/tsconfig/@types/ng-dev-mode/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/**
* Values of ngDevMode
* Depending on the current state of the application, ngDevMode may have one of several values.
*
* For convenience, the “truthy” value which enables dev mode is also an object which contains
* Angular’s performance counters. This is not necessary, but cuts down on boilerplate for the
* perf counters.
*
* ngDevMode may also be set to false. This can happen in one of a few ways:
* - The user explicitly sets `window.ngDevMode = false` somewhere in their app.
* - The user calls `enableProdMode()`.
* - The URL contains a `ngDevMode=false` text.
* Finally, ngDevMode may not have been defined at all.
*
*
* This will be provided through Terser global definitions by Angular CLI. This will
* help to tree-shake away the code unneeded for production bundles.
*/
declare const ngDevMode: boolean | {} | undefined | null;
2 changes: 1 addition & 1 deletion projects/tsconfig/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"target": "es2015",
"module": "es2020",
"lib": ["es2017", "es2018.asynciterable", "dom"],
"typeRoots": ["node_modules/@types", "scripts/types"],
"typeRoots": ["node_modules/@types", "node_modules/@taiga-ui/tsconfig/@types"],
"types": ["ng-dev-mode", "node"],
"skipLibCheck": true,
"downlevelIteration": true,
Expand Down

0 comments on commit e32cabe

Please sign in to comment.