-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Deprecate isParameter, rename to isParameterDeclaration #52283
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
// - soft: 5.0 | ||
// - warn: 5.1 | ||
// - error: TBD |
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.
These values are made up and are up for discussion.
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.
Yeah....SyntaxKind.Parameter
is used quite a bit right now. We should probably have a very long warn period.
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 comment is of course out of date, this missed 5.0 which was a shame.
I'm not totally sure what the plan here is anymore. I will note that we actually can't "remove" an enum item; there's not really a deprecation helper mechanism for that. So most people would work forever, it's just those who are using isParameter
that will have a problem.
ParameterDeclaration, | ||
/** @deprecated Use SyntaxKind.ParameterDeclaration */ | ||
Parameter = ParameterDeclaration, |
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 models what we did for JSDoc.
7485110
to
719a224
Compare
Looks like you're introducing a change to the public API surface area. If this includes breaking changes, please document them on our wiki's API Breaking Changes page. Also, please make sure @DanielRosenwasser and @RyanCavanaugh are aware of the changes, just as a heads up. |
4f7a3e1
to
7d99242
Compare
6071d41
to
d5f4d4b
Compare
1f86294
to
27426be
Compare
3c14ca7
to
e6c9ffc
Compare
I'm going to pull the |
e6c9ffc
to
a263f22
Compare
a263f22
to
e5b980e
Compare
e5b980e
to
37d6d9e
Compare
37d6d9e
to
9ef6d7a
Compare
This is a follow-up to #49929, which:
RenamesDone in another PRisParameterDeclaration
toisPartOfParameterDeclaration
.isParameter
toisParameterDeclaration
(as that is the node name).isParameter
.SyntaxKind.Parameter
toSyntaxKind.ParameterDeclaration
and adds a deprecated duplicate (like we did with JSDoc).I made up the timing for this deprecation; I just copied the same scheme as another helper's but I feel like this one needs a loooot of time for people to fix.
This may not be the safest thing because
isParameterDeclaration
was previously a different function, so people may use the new one while still using old TS versions. Not great.