chore: improve type safety of cli/js/compiler (#6647)

This commit is contained in:
Kitson Kelly 2020-07-06 10:13:27 +10:00 committed by GitHub
parent f35edc574a
commit 4f60a0b3bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -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;
}

View file

@ -29,5 +29,9 @@ declare global {
disable(): void;
getDuration(value: string): number;
};
interface SourceFile {
version?: string;
}
}
}