Hacker News new | ask | show | jobs
by emptysea 1653 days ago
I'm curious how that would work with typescript since it's adding extra props like `css` and `tw` to components which don't exist in the types
1 comments

It's Typescript-friendly, and if you use the Twin Intellisense extension for VSCode, it will autocomplete from all of the generated utilities in Tailwind, even the ones created from your own configuration of colors, spacing, etc.

Twin Macro has a few snippets of type definitions you can add to your project based on whether you're using Styled Components or Emotion, specifically to support these two props (tw and css).

They link to their Examples repo from the official readme with several projects using many different combos, with a handful of TypeScript ones.