question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add Typescript definitions

See original GitHub issue

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.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
itsMapleLeafcommented, Mar 26, 2020

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

2reactions
ben-rogersoncommented, Feb 20, 2020

Great idea - I can see the value on the autocompletion feature. I’ll put it on the cards 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeScript: Adding Custom Type Definitions for Existing ...
In these circumstances, you have to add your own custom type definitions for the libraries. This article will show you how to that....
Read more >
Documentation - Type Declarations - TypeScript
TypeScript automatically finds type definitions under node_modules/@types , so there's no other step needed to get these types available in your program.
Read more >
Add your own Type Definition to any Javascript 3rd party module
1. To the typeRoots property add your local-types folder path. "compilerOptions" : { ... "typeRoots": [ "node_modules/@types", · 2. Add a paths ...
Read more >
How to add custom types into the TypeScript project - drag13.io
Create custom typings · Create a root folder for your types. You can give any name for it but let it be types...
Read more >
Adding Custom Type Definitions to a Third-Party Library
If you've done this, you may quickly find out that if you are using TypeScript with your app, there are a lot of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Hashnode Post

No results found