Replies: 1 comment
-
UI Kit has since moved to TypeScript 🎉 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
UI-Kit releases TypeScript declarations (
d.ts
) for its components, along with the components written in JavaScript. These declarations are not being automatically validated (validation is done manually and in PR review).Problem
This lack of TypeScript declaration validation has been leading to various releases with incomplete or incompatible TS declarations (some examples: #2393 #2384 #2250 Tomoto's PRs).
A "post-release validation" can be made in the adoption project, but it being "post-release" still means incorrect declarations are being published to the teams. Besides this, the adoption project has a low component coverage, implementing just a few components (and component variations).
Proposal
Leverage
tsc
to validate both TypeScript declarations, and overall code quality.The UI Kit React project already has TypeScript installed and configured.
tsc
can be used (and has been in the past), used to identify TypeScript declaration issues. The project also has a comprehensive list of component implementations, in*.stories.js
and*.stories.test.js
(unlike adoption, which only has a few)If we run
npx tsc
for*stories.js
, we get a long list (hundreds) of problems (many duplicates). Some examples:Beta Was this translation helpful? Give feedback.
All reactions