Add option to output .js files while preserving jsx

This commit adds the ability to preserve jsx in source code, but
also to output .js files rather than .jsx files. This is useful
for react-native which does not support .jsx files.
This commit is contained in:
David Sheldrick
2017-01-23 17:40:20 +01:00
parent 3cf326a8c4
commit dd0ed44b9a
9 changed files with 125 additions and 13 deletions

5
lib/protocol.d.ts vendored
View File

@@ -1798,9 +1798,10 @@ declare namespace ts.server.protocol {
namespace JsxEmit {
type None = "None";
type Preserve = "Preserve";
type PreserveWithJsExtension = "PreserveWithJsExtension";
type React = "React";
}
type JsxEmit = JsxEmit.None | JsxEmit.Preserve | JsxEmit.React;
type JsxEmit = JsxEmit.None | JsxEmit.Preserve | JsxEmit.React | JsxEmit.PreserveWithJsExtension;
namespace ModuleKind {
type None = "None";
type CommonJS = "CommonJS";
@@ -1880,4 +1881,4 @@ declare namespace ts {
}
import protocol = ts.server.protocol;
export = protocol;
export as namespace protocol;
export as namespace protocol;