mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 11:35:42 -06:00
Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
This commit is contained in:
parent
7b1620bea2
commit
f3b21a2033
@ -26,6 +26,7 @@ import {
|
||||
optionDeclarations,
|
||||
parseCustomTypeOption,
|
||||
ScriptTarget,
|
||||
SourceFile,
|
||||
toPath,
|
||||
transpileOptionValueCompilerOptions,
|
||||
} from "./_namespaces/ts.js";
|
||||
@ -109,9 +110,11 @@ interface Symbol {
|
||||
readonly [Symbol.toStringTag]: string;
|
||||
}`;
|
||||
const barebonesLibName = "lib.d.ts";
|
||||
const barebonesLibSourceFile = createSourceFile(barebonesLibName, barebonesLibContent, { languageVersion: ScriptTarget.Latest });
|
||||
let barebonesLibSourceFile: SourceFile | undefined;
|
||||
|
||||
function transpileWorker(input: string, transpileOptions: TranspileOptions, declaration?: boolean): TranspileOutput {
|
||||
barebonesLibSourceFile ??= createSourceFile(barebonesLibName, barebonesLibContent, { languageVersion: ScriptTarget.Latest });
|
||||
|
||||
const diagnostics: Diagnostic[] = [];
|
||||
|
||||
const options: CompilerOptions = transpileOptions.compilerOptions ? fixupCompilerOptions(transpileOptions.compilerOptions, diagnostics) : {};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user