build: enable bundle_dts for router package (#28833)

This PR also changes the name of `EmptyOutletComponent` to `ɵEmptyOutletComponent`. This is because `ngcc` requires the node to retain the original name while dts bundler will rename the node is it's only exported using the aliases.

Example typings files:
```ts
declare class EmptyOutletComponent {
}
export {EmptyOutletComponent as ɵEmptyOutletComponent}
```

will be emitted as
```ts
export declare class ɵEmptyOutletComponent {
}
```

PR Close #28833
This commit is contained in:
Alan Agius 2019-02-19 18:52:44 +01:00 committed by Kara Erickson
parent c866c11bf8
commit 29f57e315e
5 changed files with 8 additions and 3 deletions

View File

@ -10,6 +10,7 @@ ng_module(
"src/**/*.ts",
],
),
bundle_dts = True,
deps = [
"//packages/common",
"//packages/core",

View File

@ -18,5 +18,7 @@ import {Component} from '@angular/core';
* to this `EmptyOutletComponent`.
*/
@Component({template: `<router-outlet></router-outlet>`})
export class EmptyOutletComponent {
}
export class ɵEmptyOutletComponent {
}
export {ɵEmptyOutletComponent as EmptyOutletComponent};

View File

@ -7,6 +7,6 @@
*/
export {EmptyOutletComponent as ɵEmptyOutletComponent} from './components/empty_outlet';
export {ɵEmptyOutletComponent} from './components/empty_outlet';
export {ROUTER_PROVIDERS as ɵROUTER_PROVIDERS} from './router_module';
export {flatten as ɵflatten} from './utils/collection';

View File

@ -7,6 +7,7 @@ exports_files(["package.json"])
ng_module(
name = "testing",
srcs = glob(["**/*.ts"]),
bundle_dts = True,
deps = [
"//packages/common",
"//packages/common/testing",

View File

@ -12,6 +12,7 @@ ng_module(
"src/**/*.ts",
],
),
bundle_dts = True,
deps = [
"//packages/common",
"//packages/core",