Introduce TypeScript support into the dev & build systems#1317
Introduce TypeScript support into the dev & build systems#1317chandlerprall merged 64 commits intoelastic:masterfrom
Conversation
|
Is there a plan for migrating components to TS? Will you / we / someone just work through them in a series of PRs? I can help if you like. |
I've tested them briefly in Kibana, doing more today & tomorrow.
I'm not sure what happened to make linking unhappy (it's something about the nested-nested node_modules in EUI), but I've started following this pattern:
I'm putting together a screencast walkthrough of the EuiSpacer conversion to help bring people up to speed. The plan is then a series of PRs - I was planning on putting a script together that can list the next candidates for conversion as we have to do a bottom-up approach to avoid importing a JS file into TS. |
FWIW, this npm pack process only worked for me when I did |
…ug in importing files
pugnascotia
left a comment
There was a problem hiding this comment.
Added comments look good.
snide
left a comment
There was a problem hiding this comment.
This is fantastic. I tested everything by converting a component in TS. chandlerprall#7
Only other comment I'd make other than the ones below is that we should update the Yeoman scripts to build TSX files and docs for new components. If that's time consuming I'm OK merging this now and making it a separate PR.
| const classes = classNames( | ||
| 'euiSpacer', | ||
| sizeToClassNameMap[size], | ||
| size ? sizeToClassNameMap[size] : undefined, |
There was a problem hiding this comment.
We should cement this as a pattern. Your vid had you redeclaring the default prop value, which I'm sure people might do since it's clean, but let's make sure we do the ternary check in review so we don't have dupe values.
|
@jasonrhodes @pugnascotia @snide Thank you all for your help on this; I've pushed up the final requested changes (yeoman template update, small docs codegen change). I'll merge this Friday morning Eastern Time unless anything else is mentioned. |
|
Cool. I'll give the new stuff a check. |
|
jenkins test this |
1 similar comment
|
jenkins test this |
Summary
closes #1262
common,required_props, and thepredicatesservice have been convertedChecklist
- [ ] This was checked in mobile- [ ] This was checked in IE11- [ ] This was checked in dark mode- [ ] Any props added have proper autodocs- [ ] This was checked against keyboard-only and screenreader scenarios- [ ] This required updates to Framer X components