-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[v2] type checking and intellisense support #3702
Comments
To make this have a high chance of working well in a way that is easy to understand, I recommend we change from the current chunked output, and simply output vanilla ES Modules that match the exact same structure as our source code. Essentially, the Anything else will be more complicated: more to understand and think about, more likely someone looking at source gets confused when looking at dist/ output, type declaration output will be more difficult to create because TypeScript will not know how to match Rollup's format, and if we then introduce a Rollup type declaration bundler this will not result in types being visible for vanilla ES module imports of any file but only for the index files. Simplifying the outputs will help everyone's mental model on both sides (prism authors + consumers). |
(not for code in Prism inside a web app, but for people consuming the Prism library, in their IDE)
Currently the v2 build provides no types for consumers. We should output declaration files that work well with vanilla ES Module usage (ensuring it works with vanilla ES Modules ensures the most compatibility: if it works with vanilla, it will work with everything else because it will be in the most standard way that tools are aligning with).
The text was updated successfully, but these errors were encountered: