angular/packages/core/src/document.ts
Anuj Chhajed 96b79fc393 refactor(core): correct all typeof ngDevMode comparison patterns introduced by #63875
This change replaces all remaining occurrences of `typeof ngDevMode !== undefined`
with the correct `typeof ngDevMode !== 'undefined'` form. This aligns the codebase
with JavaScript typeof semantics and maintains consistency with other Angular code.
2025-12-08 10:30:01 -08:00

22 lines
669 B
TypeScript

/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {InjectionToken} from './di';
/**
* A DI Token representing the main rendering context.
* In a browser and SSR this is the DOM Document.
* When using SSR, that document is created by [Domino](https://github.com/angular/domino).
*
* @see [Accessing Document via DI](guide/ssr#accessing-document-via-di)
*
* @publicApi
*/
export const DOCUMENT = new InjectionToken<Document>(
typeof ngDevMode !== 'undefined' && ngDevMode ? 'DocumentToken' : '',
);