mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-19 10:41:56 -05:00
Move handeling to a diffrent function, and remove specialized serialization
This commit is contained in:
@@ -233,45 +233,7 @@ namespace ts {
|
||||
outDir: "built",
|
||||
rootDir: ".",
|
||||
sourceMap: false,
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
export function scriptTargetToString(target: ScriptTarget): string {
|
||||
switch (target) {
|
||||
case ScriptTarget.ES5:
|
||||
return "es5";
|
||||
case ScriptTarget.ES6:
|
||||
return "es6";
|
||||
default:
|
||||
return "es3";
|
||||
}
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
export function moduleKindToString(kind: ModuleKind): string {
|
||||
switch (kind) {
|
||||
case ModuleKind.None:
|
||||
return undefined;
|
||||
case ModuleKind.CommonJS:
|
||||
return "commonjs";
|
||||
case ModuleKind.System:
|
||||
return "system";
|
||||
case ModuleKind.UMD:
|
||||
return "umd";
|
||||
default:
|
||||
return "amd";
|
||||
}
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
export function newLineKindToString(kind: NewLineKind): string {
|
||||
switch (kind) {
|
||||
case NewLineKind.CarriageReturnLineFeed:
|
||||
return "CRLF";
|
||||
default:
|
||||
return "LF";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export function createCompilerHost(options: CompilerOptions, setParentNodes?: boolean): CompilerHost {
|
||||
let currentDirectory: string;
|
||||
|
||||
Reference in New Issue
Block a user