perf: latest tsickle to tree shake: abstract class methods & interfaces (#18236)
In previous version of tsickle abstract class methods were materialized. The change resulted in 6Kb savings in angular.io bundle. This change also required the removal of `@private` and `@return` type annotation as it is explicitly dissalowed by tsickle. NOTE: removed casts in front of `makeDecorator` due to: https://github.com/angular/devkit/issues/45 ``` 14938 Jul 19 13:16 0.b19e913fbdd6507d346b.chunk.js 1535 Jul 19 13:16 inline.d8e019ea3cfdd86c2bd0.bundle.js 589178 Jul 19 13:16 main.54c97bcb6f254776b678.bundle.js 34333 Jul 19 13:16 polyfills.4a3c9ca9481d53803157.bundle.js 14938 Jul 18 16:55 0.b19e913fbdd6507d346b.chunk.js 1535 Jul 18 16:55 inline.0c83abb44fad9a2768a7.bundle.js 582786 Jul 18 16:55 main.ea290db71b051813e156.bundle.js 34333 Jul 18 16:55 polyfills.4a3c9ca9481d53803157.bundle.js main savings: 589178 - 582786 = 6,392 ``` PR Close #18236
This commit is contained in:

committed by
Miško Hevery

parent
7ae7573bc8
commit
b7a6f52d59
@ -81,12 +81,10 @@ class CustomLoaderModuleResolutionHostAdapter extends ModuleResolutionHostAdapte
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @private
|
||||
*/
|
||||
export class NgTools_InternalApi_NG_2 {
|
||||
/**
|
||||
* @internal
|
||||
* @private
|
||||
*/
|
||||
static codeGen(options: NgTools_InternalApi_NG2_CodeGen_Options): Promise<any> {
|
||||
const hostContext: CompilerHostContext =
|
||||
@ -114,7 +112,6 @@ export class NgTools_InternalApi_NG_2 {
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @private
|
||||
*/
|
||||
static listLazyRoutes(options: NgTools_InternalApi_NG2_ListLazyRoutes_Options):
|
||||
NgTools_InternalApi_NG_2_LazyRouteMap {
|
||||
@ -144,7 +141,6 @@ export class NgTools_InternalApi_NG_2 {
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* @private
|
||||
*/
|
||||
static extractI18n(options: NgTools_InternalApi_NG2_ExtractI18n_Options): Promise<any> {
|
||||
const hostContext: CompilerHostContext =
|
||||
|
@ -49,11 +49,6 @@ export class RouteDef {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @returns {LazyRouteMap}
|
||||
* @private
|
||||
*/
|
||||
export function listLazyRoutesOfModule(
|
||||
entryModule: string, host: AotCompilerHost, reflector: StaticReflector): LazyRouteMap {
|
||||
const entryRouteDef = RouteDef.fromString(entryModule);
|
||||
@ -111,7 +106,6 @@ function _resolveModule(modulePath: string, containingFile: string, host: AotCom
|
||||
|
||||
/**
|
||||
* Throw an exception if a route is in a route map, but does not point to the same module.
|
||||
* @private
|
||||
*/
|
||||
function _assertRoute(map: LazyRouteMap, route: LazyRoute) {
|
||||
const r = route.routeDef.toString();
|
||||
@ -173,7 +167,6 @@ function _extractLazyRoutesFromStaticModule(
|
||||
|
||||
/**
|
||||
* Get the NgModule Metadata of a symbol.
|
||||
* @private
|
||||
*/
|
||||
function _getNgModuleMetadata(staticSymbol: StaticSymbol, reflector: StaticReflector): NgModule {
|
||||
const ngModules = reflector.annotations(staticSymbol).filter((s: any) => s instanceof NgModule);
|
||||
@ -204,7 +197,6 @@ function _collectRoutes(
|
||||
|
||||
/**
|
||||
* Return the loadChildren values of a list of Route.
|
||||
* @private
|
||||
*/
|
||||
function _collectLoadChildren(routes: Route[]): string[] {
|
||||
return routes.reduce((m, r) => {
|
||||
|
Reference in New Issue
Block a user