Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions packages/ngtools/webpack/src/angular_compiler_plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,12 @@ export class AngularCompilerPlugin {
return { path, className };
}

get typeChecker(): ts.TypeChecker | null {
const tsProgram = this._getTsProgram();

return tsProgram ? tsProgram.getTypeChecker() : null;
}

static isSupported() {
return VERSION && parseInt(VERSION.major) >= 5;
}
Expand Down Expand Up @@ -351,7 +357,7 @@ export class AngularCompilerPlugin {
this._updateForkedTypeChecker(this._rootNames, this._getChangedCompilationFiles());
}

// Use an identity function as all our paths are absolute already.
// Use an identity function as all our paths are absolute already.
this._moduleResolutionCache = ts.createModuleResolutionCache(this._basePath, x => x);

if (this._JitMode) {
Expand Down Expand Up @@ -1020,7 +1026,7 @@ export class AngularCompilerPlugin {
.map((resourcePath) => resolve(dirname(resolvedFileName), normalize(resourcePath)));

// These paths are meant to be used by the loader so we must denormalize them.
const uniqueDependencies = new Set([
const uniqueDependencies = new Set([
...esImports,
...resourceImports,
...this.getResourceDependencies(this._compilerHost.denormalizePath(resolvedFileName)),
Expand Down