-
Notifications
You must be signed in to change notification settings - Fork 12.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JavaScript powered by TypeScript #5044
Conversation
…rly setting parents.
# Conflicts: # src/compiler/binder.ts
@ahejlsberg AMD support is removed; logic moved into the binder as we discussed. Let me know what you think. |
* Returns the first invocation of an identifier 'require' with one argument, | ||
* or undefined if that none exist. | ||
*/ | ||
function findCommonJSRequireCalls(node: Node): Node { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This effectively does a full AST walk, which is expensive. We should just collect this information in the binder.
Fix up unit tests and remove AMD from lib files # Conflicts: # src/compiler/program.ts
@@ -1775,6 +1779,7 @@ namespace ts { | |||
importOnRightSide?: Symbol; // for import declarations - import that appear on the right side | |||
jsxFlags?: JsxFlags; // flags for knowning what kind of element/attributes we're dealing with | |||
resolvedJsxType?: Type; // resolved element attributes type of a JSX openinglike element | |||
resolvedContextualType?: Type; // Cached contextual type of expression node |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove
node.flags = node.flags | NodeFlags.InferredClass; | ||
} | ||
else { | ||
let hasDeclaredProperties = forEachChild(node, child => child.kind === SyntaxKind.PropertyDeclaration); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we doing this? We're in a TypeScript file here.
We should close this one. @RyanCavanaugh picked this up in a different PR. |
This PR is a accumulation of several other PRs (support for JSDocs, supports for recognizing JavaScript modules etc...)