Skip to content

Commit 3466232

Browse files
authored
fix(build): Remove duplicate System declarations (angular#10713)
Add it to a common .d.ts. Prevents closure from complaining of duplicate declarations when compiled using tsickle to generate externs.
1 parent 6e842fc commit 3466232

File tree

7 files changed

+9
-8
lines changed

7 files changed

+9
-8
lines changed

modules/@angular/core/src/linker/system_js_ng_module_factory_loader.ts

-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ import {Compiler} from './compiler';
1313
import {NgModuleFactory} from './ng_module_factory';
1414
import {NgModuleFactoryLoader} from './ng_module_factory_loader';
1515

16-
declare var System: {import: (module: string) => Promise<any>;};
17-
1816
const _SEPARATOR = '#';
1917

2018
const FACTORY_MODULE_SUFFIX = '.ngfactory';

modules/@angular/core/src/linker/systemjs_component_resolver.ts

-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ import {Type} from '../type';
1313
import {ComponentFactory} from './component_factory';
1414
import {ComponentResolver} from './component_resolver';
1515

16-
declare var System: {import: (module: string) => Promise<any>;};
17-
1816
const _SEPARATOR = '#';
1917

2018
/**

modules/@angular/core/tsconfig-es2015.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"files": [
1919
"index.ts",
2020
"testing.ts",
21-
"../../../node_modules/zone.js/dist/zone.js.d.ts"
21+
"../../../node_modules/zone.js/dist/zone.js.d.ts",
22+
"../../system.d.ts"
2223
]
2324
}

modules/@angular/core/tsconfig-es5.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"files": [
2020
"index.ts",
2121
"testing.ts",
22-
"../../../node_modules/zone.js/dist/zone.js.d.ts"
22+
"../../../node_modules/zone.js/dist/zone.js.d.ts",
23+
"../../system.d.ts"
2324
]
2425
}

modules/playground/src/bootstrap.ts

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9-
declare var System: any;
10-
119

1210
(function(global: any /** TODO #9100 */) {
1311

modules/system.d.ts

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/**
2+
* Dummy typings for systemjs.
3+
*/
4+
declare var System: any;

modules/types.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@
1515
/// <reference path="../node_modules/@types/protractor/index.d.ts" />
1616
/// <reference path="../node_modules/@types/selenium-webdriver/index.d.ts" />
1717
/// <reference path="./es6-subset.d.ts" />
18+
/// <reference path="./system.d.ts" />

0 commit comments

Comments
 (0)