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 |
pugnascotia
left a comment
There was a problem hiding this comment.
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
srcfrom published code.t.ds,.ts, and.tsxfromsrcinto a top-leveleui.d.tsfile for publishingtypesdirectory 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.tsfile. I also removed thesrcdirectory 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.tsand.tsxfiles.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