fix(linker/compiler): rename const to avoid duplicate declaration (#10457)
Currently in the `linker/compiler.ts` file, the **same identifier** is used in **two declarations**:
```typescript
export type CompilerOptions = { … }
…
export const CompilerOptions = new OpaqueToken('compilerOptions');
```
This breaks the API doc generation. I’m surprised that this was not flagged by the tsc.
The duplicate declaration was introduced in 46b212706b
.
This commit is contained in:

committed by
Alex Rickabaugh

parent
ce5ba80792
commit
2b704f0586
@ -8,7 +8,7 @@
|
||||
|
||||
import {analyzeAppProvidersForDeprecatedConfiguration} from '@angular/compiler';
|
||||
import {platformCoreDynamicTesting} from '@angular/compiler/testing';
|
||||
import {CompilerFactory, CompilerOptions, NgModule, OpaqueToken, PLATFORM_COMMON_PROVIDERS, PLATFORM_INITIALIZER, PlatformRef, ReflectiveInjector, assertPlatform, createPlatform, createPlatformFactory, getPlatform} from '@angular/core';
|
||||
import {COMPILER_OPTIONS, CompilerFactory, NgModule, OpaqueToken, PLATFORM_COMMON_PROVIDERS, PLATFORM_INITIALIZER, PlatformRef, ReflectiveInjector, assertPlatform, createPlatform, createPlatformFactory, getPlatform} from '@angular/core';
|
||||
import {TestBed} from '@angular/core/testing';
|
||||
import {BrowserDynamicTestingModule, TEST_BROWSER_DYNAMIC_APPLICATION_PROVIDERS, platformBrowserDynamicTesting} from '@angular/platform-browser-dynamic/testing';
|
||||
|
||||
@ -17,6 +17,7 @@ import {platformServer} from '../index';
|
||||
import {Parse5DomAdapter} from '../src/parse5_adapter';
|
||||
import {INTERNAL_SERVER_PLATFORM_PROVIDERS} from '../src/server';
|
||||
|
||||
|
||||
/**
|
||||
* Platform for testing
|
||||
*
|
||||
@ -51,7 +52,7 @@ export const TEST_SERVER_PLATFORM_PROVIDERS: Array<any /*Type | Provider | any[]
|
||||
[(appProviders: any[]) => {
|
||||
const deprecatedConfiguration = analyzeAppProvidersForDeprecatedConfiguration(appProviders);
|
||||
const platformRef = createPlatformFactory(platformServerTesting, 'serverTestingDeprecated', [{
|
||||
provide: CompilerOptions,
|
||||
provide: COMPILER_OPTIONS,
|
||||
useValue: deprecatedConfiguration.compilerOptions,
|
||||
multi: true
|
||||
}])();
|
||||
|
Reference in New Issue
Block a user