Merge pull request #11762 from Microsoft/jsxEmit

Set parent of reactnamespace identifier to be parse tree node
This commit is contained in:
Sheetal Nandi
2016-10-24 10:53:24 -07:00
committed by GitHub
5 changed files with 390 additions and 1 deletions

View File

@@ -1625,7 +1625,9 @@ namespace ts {
// flag and setting a parent node.
const react = createIdentifier(reactNamespace || "React");
react.flags &= ~NodeFlags.Synthesized;
react.parent = parent;
// Set the parent that is in parse tree
// this makes sure that parent chain is intact for checker to traverse complete scope tree
react.parent = getParseTreeNode(parent);
return react;
}