-
Notifications
You must be signed in to change notification settings - Fork 18
Typescript deprecated jsdoc #149
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
Typescript deprecated jsdoc #149
Conversation
Generate changelog in
|
| version "4.3.0" | ||
| resolved "https://registry.yarnpkg.com/conjure-api/-/conjure-api-4.3.0.tgz#c778736f369e7c749a86118e14dab83deb698ace" | ||
| integrity sha512-AnZe6qkiCRSsfuQMgA556dFs+/DbXpCK2uuhq9bHn36dSbKi+6HUDntpc9jkVPzWOecLXGqy+JAD6IKV8c9Sqw== | ||
| conjure-api@^4.13.0: |
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 did we need to bump the conjure API?
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.
The old one did not contain the "deprecated" key
src/commands/generate/utils.ts
Outdated
| ]); | ||
|
|
||
| type DeprecatableDefinitions = IFieldDefinition | IEnumValueDefinition | IEndpointDefinition; | ||
| export function addDeprecatedToDocs<T extends DeprecatableDefinitions>(typeDefintion: T): T { |
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.
can we avoid mutating objects and instead construct a better doc string when creating the object?
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.
Changed so it doesn't mutate. It is a little weird how before though the docs were being put on as a JSDocStructure when a string will do. I also saw it took an array so tried to pass it in with 2 strings, but the second would not be picked up. I'm guessing it's just old code so just changed to pass back a string[] or undefined.
ferozco
left a comment
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.
Thanks @rhysbrettbowen
|
Looks good, you'll need to manually add a changelog since the automation doesn't work across forks |
|
changelog added |
|
Released 4.3.0 |
fixes #120
Before this PR
deprecated keyword is not added to typescript in any way
After this PR
==COMMIT_MSG==
deprecated message is added with a
@deprecatedjsdoc to the comments==COMMIT_MSG==
Possible downsides?