ts-simple-ast
Version:
TypeScript compiler wrapper for AST navigation and code generation.
17 lines (16 loc) • 648 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var ts = require("typescript");
var errors = require("./../errors");
var ManipulationSettings_1 = require("./../ManipulationSettings");
function newLineKindToTs(kind) {
switch (kind) {
case ManipulationSettings_1.NewLineKind.CarriageReturnLineFeed:
return ts.NewLineKind.CarriageReturnLineFeed;
case ManipulationSettings_1.NewLineKind.LineFeed:
return ts.NewLineKind.LineFeed;
default:
throw new errors.NotImplementedError("Not implemented newline kind");
}
}
exports.newLineKindToTs = newLineKindToTs;