tw-in-js / typescript-plugin

TypeScript language service plugin that adds IntelliSense for tailwindjs
MIT License
42 stars 6 forks source link

fix: support Typescript 5 #22

Open AlexanderArvidsson opened 3 months ago

AlexanderArvidsson commented 3 months ago

Updates the plugin to work with Typescript 5. Most likely not backwards compatible with Typescript 4, I have not tried it. The biggest change is the consolidation of tsserverlibrary and typescript libraries, and the removal of project wide resolveModuleNames (they are deprecated anyway). It now relies on the language server host to resolve the twind DTS file.

Typescript 5 is stricter, so some parts of the code had to be updated with proper typing.

Solves https://github.com/tw-in-js/typescript-plugin/issues/21, https://github.com/tw-in-js/vscode-twind-intellisense/issues/24, https://github.com/tw-in-js/vscode-twind-intellisense/issues/22, https://github.com/tw-in-js/vscode-twind-intellisense/issues/23

I read that you plan to rework this plugin to use your new intellisense package, but until that is done this should suffice. You'll probably want to publish the current plugin as a v4 version, but that's entirely up to you!

xlboy commented 2 months ago

This is a separate VSCode Twind intellisense extension that I developed, which only supports v1. It is still a work in progress. If you're interested, feel free to check it out.

AlexanderArvidsson commented 2 months ago

This is a separate VSCode Twind intellisense extension that I developed, which only supports v1. It is still a work in progress. If you're interested, feel free to check it out.

Thanks, but I'm actually not using VS Code. A Typescript plugin (in my eyes) is always superior to any editor-specific plugin due to the fact it's agnostic, so it can be used with any editor. Personally, I would push this plugin due to that, rather than a VS Code plugin.