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C;AAAD,CAAC,AAZD,IAYC","sourcesContent":["import { Injector } from '../injector';\n/**\n * @license\n * Copyright Google Inc. All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nexport interface BrowserNodeGlobal {\n Object: typeof Object;\n Array: typeof Array;\n Map: typeof Map;\n Set: typeof Set;\n Date: DateConstructor;\n RegExp: RegExpConstructor;\n JSON: typeof JSON;\n Math: any; // typeof Math;\n assert(condition: any): void;\n Reflect: any;\n getAngularTestability: Function;\n getAllAngularTestabilities: Function;\n getAllAngularRootElements: Function;\n frameworkStabilizers: Array<Function>;\n setTimeout: Function;\n clearTimeout: Function;\n setInterval: Function;\n clearInterval: Function;\n encodeURI: Function;\n}\n\n// TODO(jteplitz602): Load WorkerGlobalScope from lib.webworker.d.ts file #3492\ndeclare var WorkerGlobalScope: any /** TODO #9100 */;\n// CommonJS / Node have global context exposed as \"global\" variable.\n// We don't want to include the whole node.d.ts this this compilation unit so we'll just fake\n// the global \"global\" var for now.\ndeclare var global: any /** TODO #9100 */;\n\nlet globalScope: BrowserNodeGlobal;\nif (typeof window === 'undefined') {\n if (typeof WorkerGlobalScope !== 'undefined' && self instanceof WorkerGlobalScope) {\n // TODO: Replace any with WorkerGlobalScope from lib.webworker.d.ts #3492\n globalScope = <any>self;\n } else {\n globalScope = <any>global;\n }\n} else {\n globalScope = <any>window;\n}\n\n// Need to declare a new variable for global here since TypeScript\n// exports the original value of the symbol.\nconst _global: BrowserNodeGlobal = globalScope;\n\nexport { _global as global };\n\nexport function isPresent<T>(obj: T): obj is NonNullable<T> {\n return obj != null;\n}\n\nexport function stringify(token: any): string {\n if (typeof token === 'string') {\n return token;\n }\n\n if (token == null) {\n return '' + token;\n }\n\n if (token.overriddenName) {\n return `${token.overriddenName}`;\n }\n\n if (token.name) {\n return `${token.name}`;\n }\n\n const res = token.toString();\n const newLineIndex = res.indexOf('\\n');\n return newLineIndex === -1 ? res : res.substring(0, newLineIndex);\n}\n\nexport abstract class DebugContext {\n // We don't really need this\n // abstract get view(): ViewData;\n abstract get nodeIndex(): number | null;\n abstract get injector(): Injector;\n abstract get component(): any;\n abstract get providerTokens(): any[];\n abstract get references(): { [key: string]: any };\n abstract get context(): any;\n abstract get componentRenderElement(): any;\n abstract get renderNode(): any;\n abstract logError(console: Console, ...values: any[]): void;\n}\n"]}
\No newline at end of file