add notifications and tests for jsx react-native es3

This commit is contained in:
David Sheldrick
2017-01-23 22:08:39 +01:00
parent 8d590d5191
commit 7bf52ee1fd
13 changed files with 134 additions and 2 deletions

View File

@@ -14,7 +14,7 @@ namespace ts {
// enable emit notification only if using --jsx preserve
let previousOnEmitNode: (emitContext: EmitContext, node: Node, emitCallback: (emitContext: EmitContext, node: Node) => void) => void;
let noSubstitution: boolean[];
if (compilerOptions.jsx === JsxEmit.Preserve) {
if (compilerOptions.jsx === JsxEmit.Preserve || compilerOptions.jsx === JsxEmit.ReactNative) {
previousOnEmitNode = context.onEmitNode;
context.onEmitNode = onEmitNode;
context.enableEmitNotification(SyntaxKind.JsxOpeningElement);
@@ -116,4 +116,4 @@ namespace ts {
return undefined;
}
}
}
}