angular-cn/packages/compiler-cli/src/ngcc/test
Alan Agius a5b8420234 fix(ivy): render alias exports for private declarations if possible (#28735)
Sometimes declarations are not exported publicly but are exported under
a private name. In this case, rather than adding a completely new
export to the entry point, we should create an export that aliases the
private name back to the original public name.

This is important when the typings files have been rolled-up using a tool
such as the [API Extractor](https://api-extractor.com/). In this case
the internal type of an aliased private export will be removed completely
from the typings file, so there is no "original" type to re-export.

For example:

If there are the following TS files:

**entry-point.ts**

```ts
export {Internal as External} from './internal';
```

**internal.ts**

```ts
export class Internal {
  foo(): void;
}
```

Then the API Extractor might roll up the .d.ts files into:

```ts
export declare class External {
  foo(): void;
}
```

In this case ngcc should add an export so the file looks like:

```ts
export declare class External {
  foo(): void;
}
export {External as Internal};
```

PR Close #28735
2019-03-11 07:17:19 -07:00
..
analysis fix(ivy): render alias exports for private declarations if possible (#28735) 2019-03-11 07:17:19 -07:00
helpers feat(ivy): use fileNameToModuleName to emit imports when it's available (#28523) 2019-02-13 19:13:11 -08:00
host fix(ivy): ngcc - handle prototype pseudo-member from typings file in ESM5 host (#29158) 2019-03-08 09:34:20 -08:00
packages style(ivy): ngcc - fix misspelled method (#26906) 2018-11-30 14:02:03 -08:00
rendering fix(ivy): render alias exports for private declarations if possible (#28735) 2019-03-11 07:17:19 -07:00
BUILD.bazel build: rules_nodejs 0.26.0 & use @npm instead of @ngdeps now that downstream angular build uses angular bundles (#28871) 2019-02-28 12:06:36 -08:00