8000 inferFromUsage codefix now emits JSDoc in JS files by sandersn · Pull Request #27610 · microsoft/TypeScript · GitHub
[go: up one dir, main page]

Skip to content

inferFromUsage codefix now emits JSDoc in JS files #27610

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

Merged
merged 24 commits into from
Oct 9, 2018
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
1bc0cd1
Now adding @type to variable declarations, at least
sandersn Sep 28, 2018
e34bf54
Improve @param output and add test
sandersn Sep 28, 2018
0f4a800
Add some js/inferFromUsage tests and fixes
sandersn Oct 1, 2018
be3577c
Fix @typedef refactor
sandersn Oct 2, 2018
bf5529b
Emit JSDoc optional parameters
sandersn Oct 2, 2018
4ee4d69
Get rest of existing tests working
sandersn Oct 3, 2018
9ae4a99
Merge branch 'master' into js/infer-from-usage
sandersn Oct 4, 2018
09ae612
Merge branch 'master' into js/infer-from-usage
sandersn Oct 4, 2018
e99220f
Merge branch 'master' into js/infer-from-usage
sandersn Oct 5, 2018
ae062b2
Correct location of comments
sandersn Oct 5, 2018
69dec3f
Handle @param blocks
sandersn Oct 5, 2018
b469d9f
Re-add isGet/SetAccessor -- it is part of the API
sandersn Oct 5, 2018
56bcf3f
Move isSet/GetAccessor back to the original location
sandersn Oct 5, 2018
84b08c0
Merge branch 'master' into js/infer-from-usage
sandersn Oct 5, 2018
a3aae7b
Oh no I missed a newline and a space
sandersn Oct 5, 2018
d22961a
Switch to an object 8000 type
sandersn Oct 5, 2018
3cc99ea
A lot of cleanup
sandersn Oct 5, 2018
31db1ce
Move and delegate to annotateJSDocParameters
sandersn Oct 8, 2018
6b0be8b
Merge branch 'master' into js/infer-from-usage
sandersn Oct 8, 2018
edcb30d
Address PR comments
sandersn Oct 8, 2018
d129e32
Lint: newline problems!!!!
sandersn Oct 8, 2018
e3cf787
Switch another call to getNonformattedText
sandersn Oct 9, 2018
bc32d3c
Merge branch 'master' into js/infer-from-usage
sandersn Oct 9, 2018
5066880
Update baseline missed after merge
sandersn Oct 9, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Move isSet/GetAccessor back to the original location
  • Loading branch information
sandersn committed Oct 5, 2018
commit 56bcf3f5f2313da7f21c6bc5bc0e61e5219ba9ee
14 changes: 7 additions & 7 deletions src/compiler/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6719,6 +6719,13 @@ namespace ts {
return node.kind >= SyntaxKind.FirstJSDocTagNode && node.kind <= SyntaxKind.LastJSDocTagNode;
}

export function isSetAccessor(node: Node): node is SetAccessorDeclaration {
return node.kind === SyntaxKind.SetAccessor;
}
export function isGetAccessor(node: Node): node is GetAccessorDeclaration {
return node.kind === SyntaxKind.GetAccessor;
}

/** True if has jsdoc nodes attached to it. */
/* @internal */
// TODO: GH#19856 Would like to return `node is Node & { jsDoc: JSDoc[] }` but it causes long compile times
Expand All @@ -6727,13 +6734,6 @@ namespace ts {
return !!jsDoc && jsDoc.length > 0;
}

export function isSetAccessor(node: Node): node is SetAccessorDeclaration {
return node.kind === SyntaxKind.SetAccessor;
}
export function isGetAccessor(node: Node): node is GetAccessorDeclaration {
return node.kind === SyntaxKind.GetAccessor;
}

/** True if has type node attached to it. */
/* @internal */
export function hasType(node: Node): node is HasType {
Expand Down
0