tailwindcss-debug-screens icon indicating copy to clipboard operation
tailwindcss-debug-screens copied to clipboard

[Feature Request] Add type declaration file

Open mizlan opened this issue 1 year ago • 5 comments

Screenshot 2023-12-15 at 2 55 01 PM

Getting the warning, was wondering if you'd consider adding the type declaration file.

mizlan avatar Dec 15 '23 22:12 mizlan

Good idea :) I guess it would be more or less the same like the type declaration file in the tailwindcss/typography plugin? Would be more than happy to merge a PR.

jorenvanhee avatar Dec 16 '23 22:12 jorenvanhee

I'll send a PR soon!

mizlan avatar Dec 21 '23 02:12 mizlan

As I was browsing some documentation, I was curious why you specify configuration to be defined in theme instead of in an options argument like Typography:

https://tailwindcss.com/docs/typography-plugin#changing-the-default-class-name

Seems like the latter makes more sense, since there is locality between the plugin and the configuration

mizlan avatar Dec 25 '23 03:12 mizlan

I built this plugin back in the Tailwind CSS 1.x days and that happened to be the recommended way. I see that they now recommend another way indeed.

I guess it would be easier to add the types once the new recommended options are implemented?

jorenvanhee avatar Dec 25 '23 23:12 jorenvanhee

Yeah, probably? I have a file that is sufficient to stop the warning in my original screenshot but I can add another call with an options object and it doesn't error. Don't know if that can be prevented.

mizlan avatar Dec 29 '23 01:12 mizlan