-
-
Notifications
You must be signed in to change notification settings - Fork 569
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
jsonify: add jump to definition and any
support
#519
jsonify: add jump to definition and any
support
#519
Conversation
any
support
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 @sachinraja, this is really awesome! 🤩
Once this one's merged, we can start using it in the Remix codebase 😍
Co-authored-by: Michaël De Boey <[email protected]>
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.
Forgot to mention these 🙈
No problem if you decide to not change these though 🤷♂️
Co-authored-by: Michaël De Boey <[email protected]>
Nice work 👍 |
These changes are upstreamed from work I did for tRPC and Remix.
For data inferred from
Jsonify
, properties do not have jump to definition. This is because key remapping which breaks jump to definition support for TS (see microsoft/TypeScript#47813). I changed it to use a different strategy for filtering that keeps jump to definition.I also added support for the
any
type, previouslyJsonify<any>
wasnever
and other variations of that were incorrect too.I refactored the implementation because the previous one did not flow well with these changes.
cc @MichaelDeBoey