Twin.macro: Add Typescript definitions

Created on 20 Feb 2020  ยท  6Comments  ยท  Source: ben-rogerson/twin.macro

Would be awesome to have both for discoverability / auto-completion, and also checking for mistakes and errors.

@emotion/styled has this for css properties, so we could have it for the tailwind classes ๐Ÿ™‚

Maybe take inspiration from https://github.com/christianalfoni/tailwindcss-classnames or https://github.com/dvkndn/typed.tw.

feature request

Most helpful comment

Great idea - I can see the value on the autocompletion feature. I'll put it on the cards ๐Ÿ‘

All 6 comments

Great idea - I can see the value on the autocompletion feature. I'll put it on the cards ๐Ÿ‘

I'm down to help contribute to this, as I think that types here would be quite simple!

Can anyone find an example of typescript definitions for babel macros?

Is there any work being done on this? If not, I have some minimal incomplete typings that I wouldn't mind fixing up and making a PR for

EDIT: Already working on it, PR coming in a bit

Could you push these? I would love to learn from this and help you compete them

Sent via Superhuman iOS ( https://sprh.mn/[email protected] )

On Thu, Mar 26 2020 at 7:10 pm, Darius < [email protected] > wrote:

Is there any work being done on this? If not, I have some minimal
incomplete typings that I wouldn't mind fixing up and making a PR for

Can anyone find an example of typescript definitions for babel macros?

The macro part isn't important, what is:

  • Typing a tagged template function
  • Typing all of the tw.xyz styled functions
  • Typing the tw prop

โ€”
You are receiving this because you commented.
Reply to this email directly, view it on GitHub (
https://github.com/ben-rogerson/twin.macro/issues/5#issuecomment-604628680
) , or unsubscribe (
https://github.com/notifications/unsubscribe-auth/ABOEMPL3HGFBCYFD3WXYMZLRJOSCXANCNFSM4KYROEWQ
).

@rbutera Pushed! #21 The types are already mostly complete, but comments/tweaks/improvements are always welcome ๐Ÿ™‚

Types are now up and running in 1.0.0-alpha.8 ๐ŸŽ‰
Thanks @kingdaro !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

laclance picture laclance  ยท  8Comments

bennettrogers picture bennettrogers  ยท  5Comments

JoseRFelix picture JoseRFelix  ยท  4Comments

DaneEveritt picture DaneEveritt  ยท  6Comments

nightgrey picture nightgrey  ยท  3Comments