diff --git a/cli/js/compiler.ts b/cli/js/compiler.ts index 905f5efb25..33fef4002f 100644 --- a/cli/js/compiler.ts +++ b/cli/js/compiler.ts @@ -245,6 +245,7 @@ class SourceFile { processed = false; sourceCode?: string; tsSourceFile?: ts.SourceFile; + versionHash!: string; url!: string; constructor(json: SourceFileJson) { @@ -445,7 +446,6 @@ class Host implements ts.CompilerHost { sourceFile.sourceCode, languageVersion ); - //@ts-ignore sourceFile.tsSourceFile.version = sourceFile.versionHash; delete sourceFile.sourceCode; } diff --git a/cli/js/ts_global.d.ts b/cli/js/ts_global.d.ts index dcdf4a3e46..a32e8b620d 100644 --- a/cli/js/ts_global.d.ts +++ b/cli/js/ts_global.d.ts @@ -29,5 +29,9 @@ declare global { disable(): void; getDuration(value: string): number; }; + + interface SourceFile { + version?: string; + } } }