-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
refactor(spelling): correct misspelled response #33921
refactor(spelling): correct misspelled response #33921
Conversation
Thanks for the PR! It looks like you've changed the TSServer protocol in some way. Please ensure that any changes here don't break consumers of the current TSServer API. For some extra review, we'll ping @sheetalkamat, @amcasey, @mjbvz, @minestarks for you. Feel free to loop in other consumers/maintainers if necessary |
It looks like this has, unfortunately, already shipped, so we probably have to keep the misspelled one for back compat. I'm guessing the preferred approach is to add the new one with correct spelling and flag the old one as deprecated. @sheetalkamat? |
Yes that's the way we would need to handle this change. |
@amcasey, @sheetalkamat: Could you possibly point me in the right direction on how to make this change but also keep backwards compatibility? |
Looks like this only touches a type name and not the protocol itself, so do we really need to worry about breaking things? The change maybe cause a compile error but I think server would still work if you use the old misspelled type name |
export interface DefinitionInfoAndBoundSpanResponse extends Response {
body?: DefinitionInfoAndBoundSpan;
}
/**
* @deprecated
*/
export interface DefinitionInfoAndBoundSpanReponse extends DefinitionInfoAndBoundSpanResponse {} Would something like the above suffice? |
@mjbvz I agree that it should still work at runtime, but I think we prefer to avoid compiler errors as well. @sQVe My naive guess would have been |
/** @deprecated Use `DefinitionInfoAndBoundSpanResponse` instead. */
export type DefinitionInfoAndBoundSpanReponse = DefinitionInfoAndBoundSpanResponse ; |
@amcasey, @sheetalkamat: Backwards compability is now added. I made the assumption that I could leave the tests untouched and just use the new correctly named type. |
Unsure on how to make the tests pass.
Above is not much to go on. |
You need to run |
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.
LGTM once the tests pass. Thanks!
Got the tests to pass and squashed commits into one. I think this is ready for a merge now. 🙏 |
This PR fixes a spelling mistake introduced with 8004fec.