mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-21 14:02:43 +08:00
refactor(@ngtools/webpack): expose TS TypeChecker from NG compiler plugin
Expose the TypeScript Program created by the plugin, so that it can be used in custom platform transformers.
This commit is contained in:
parent
f3e389bd8c
commit
311723d369
@ -174,6 +174,12 @@ export class AngularCompilerPlugin {
|
|||||||
return { path, className };
|
return { path, className };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get typeChecker(): ts.TypeChecker | null {
|
||||||
|
const tsProgram = this._getTsProgram();
|
||||||
|
|
||||||
|
return tsProgram ? tsProgram.getTypeChecker() : null;
|
||||||
|
}
|
||||||
|
|
||||||
static isSupported() {
|
static isSupported() {
|
||||||
return VERSION && parseInt(VERSION.major) >= 5;
|
return VERSION && parseInt(VERSION.major) >= 5;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user