-
Notifications
You must be signed in to change notification settings - Fork 438
Generate declaration maps #977
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
base: develop
Are you sure you want to change the base?
Conversation
Adjusted our use of @overlord to the new generation behavior (overloads are generated in definition order, not vice versa). Relevant changelog entries: * https://github.com/nikku/bio-dts/blob/main/CHANGELOG.md#0120 * https://github.com/nikku/bio-dts/blob/main/CHANGELOG.md#0130
Recommended practice for library authors (that ship source code with their modules, cf. microsoft/TypeScript#49003).
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 played with it a bit and it sometimes puts me in a wrong place in the file, which is still a lot better then being in the types file instead. Step in the right direction, I'm glad we're looking into developers' quality of life. 👍
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.
At the moment the generated type maps have a worse quality than the heuristic Find source definition
of TS server. I agree that it would be nice to ship at least something for users, but then we should make it opt-out for users that want better maps with the cost of worse performance. Alternative would be to adjust tooling to generate proper maps
Here are also some references:
|
@jarekdanielak did you try this setting?
|
@Buckwich yeah, actually with that setting on I'm getting better results without the new types. 🤨 |
This did not get consensus, I move it back to |
should we also mark this PR as draft? |
Proposed Changes
Generates types with declaration maps, the recommended practice for library authors that ship source code.
Once generated, "Go to definition" (
F12
in Sublime Text) will no longer jump to types, but to the actual source file:Try out
git checkout generate-declaration-maps
npm run generate-types
Checklist
To ensure you provided everything we need to look at your PR:
@bpmn-io/sr
toolCloses {LINK_TO_ISSUE}
orRelated to {LINK_TO_ISSUE}
Related to discussion