-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Fix for jsdoc modifiers on constructor params #38403
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
Conversation
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.
I think the basic approach is a good idea. Hats off for updating every single usage.
Couple of questions and individual usage, and I think this should not go into 3.9 because our test coverage is so poor in this area; I'd like to have people use it for quite a while first.
src/services/codefixes/fixClassIncorrectlyImplementsInterface.ts
Outdated
Show resolved
Hide resolved
I've updated based on feedback. |
@sandersn can you take another look? |
* upstream/master: (54 commits) LEGO: check in for master to temporary branch. LEGO: check in for master to temporary branch. Fix for jsdoc modifiers on constructor params (microsoft#38403) Improve assert message in binder (microsoft#38270) fix broken regex on "src/services/completions.ts#getCompletionData" (microsoft#37546) report error for duplicate @type declaration (microsoft#38340) fix(38073): hide 'Extract to function in global scope' action for arrow functions which use 'this' (microsoft#38107) Update user baselines (microsoft#38472) Update user baselines (microsoft#38405) Changed template strings to emit void 0 instead of undefined (microsoft#38430) Fix js missing type arguments on existing nodes and jsdoc object literal declaration emit (microsoft#38368) LEGO: check in for master to temporary branch. Make isDynamicFileName available publicly (microsoft#38269) LEGO: check in for master to temporary branch. LEGO: check in for master to temporary branch. Exclude arrays and tuples from full intersection property check (microsoft#38395) Fix crash caused by assertion with evolving array type (microsoft#38398) Update user baselines (microsoft#38128) LEGO: check in for master to temporary branch. moveToNewFile: handle namespace imports too ... # Conflicts: # src/compiler/types.ts # src/compiler/utilities.ts
When we added support for
@public
,@private
,@protected
,@readonly
JSDoc-style modifiers, we inadvertently treated such modifiers on constructor properties as if they were TypeScript "parameter property modifiers", resulting in comments in a JS source file affecting JS emit.This PR splits the various "modifier"-related functions into "syntactic" and "effective" forms, where "syntactic" modifiers are derived from syntax, and "effective" modifiers including both the syntactic modifiers as well as modifiers derived from "jsdoc" comments.
Fixes #38401
/cc @DanielRosenwasser, @RyanCavanaugh in case we decide to take this for 3.9.