-
Notifications
You must be signed in to change notification settings - Fork 842
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
TS types output #1304
TS types output #1304
Conversation
Sorry, clicked close by mistake. Anyway, the code looks reasonable. I ran the build and it created I noticed that there are still triple-slash directives in |
The I'll double check that the triple-slash references aren't a problem, or if they can be excluded from the generated file. |
@pugnascotia the |
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.
Run the result through prettier
?
/ducks
Joking, LGTM.
LGTM too, I notice that the jsdoc style comments are imported in and then show up in VS Code. The path for the |
Summary
supports #1262
src
from published code.t.ds
,.ts
, and.tsx
fromsrc
into a top-leveleui.d.ts
file for publishingtypes
directory which is git- and npm-ignored, this allows the typescript binary to have a place to emit definitions & transpiled files, as turning emit off creates other problems.Tested by linking EUI into kibana and modifying the new
eui.d.ts
file. I also removed thesrc
directory in the linked build to ensure it was no longer used.This relies on dts-generator for the dirty work of combining all definitions into the top-level
eui.d.ts
. The implementation on this branch (scripts/dtsgenerator.js) is overkill but is the correct setup to allow authoring pure typescript files. The changes in this PR are pulled over from my in-progress typescript branch (https://github.com/chandlerprall/eui/tree/feature/typescript) which uses this setup to support both existing.d.ts
and.tsx
files.Checklist
- [ ] This was checked in mobile- [ ] This was checked in IE11- [ ] This was checked in dark mode- [ ] Any props added have proper autodocs- [ ] Documentation examples were added- [ ] This was checked for breaking changes and labeled appropriately- [ ] Jest tests were updated or added to match the most common scenarios- [ ] This was checked against keyboard-only and screenreader scenarios- [ ] This required updates to Framer X components