Skip to content
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

Closed
wants to merge 224 commits into from
Closed

JavaScript powered by TypeScript #5044

wants to merge 224 commits into from

Conversation

vladima
Copy link
Contributor

@vladima vladima commented Sep 30, 2015

This PR is a accumulation of several other PRs (support for JSDocs, supports for recognizing JavaScript modules etc...)

@RyanCavanaugh
Copy link
Member

@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 {
Copy link
Member

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.

@@ -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
Copy link
Member

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);
Copy link
Member

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.

@mhegazy
Copy link
Contributor

mhegazy commented Dec 8, 2015

We should close this one. @RyanCavanaugh picked this up in a different PR.

@vladima vladima closed this Dec 8, 2015
@vladima vladima deleted the JSDocAndJSModules branch December 8, 2015 21:24
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants