Export dist/es/index.d.ts files for use with Volar#2513
Export dist/es/index.d.ts files for use with Volar#2513duncanfinney wants to merge 1 commit intoTurfjs:masterfrom
Conversation
|
Hi @duncanfinney . Thanks for this. Are there any downsides you can see, or things we might need to mention in the documentation? For example would we need to advise anyone who hast the @types/turf workaround installed to remove it? |
|
Took a closer look at the error message and think we might need to look into this in more detail. The message says:
To summarise, the types are in the package, referenced from the "types" field in package.json which is as it should be. Volar finds them, but some other configuration prevents it resolving them confidently. Does that sound accurate to you? Rather than duplicate the d.ts in the package, I'd lean more towards correcting the |
|
@duncanfinney going to retire this PR in favour of #2555 which should have Turf export declaration files more predictably and consistently. Once the next alpha drops (alpha.3 by my count) please give it a try and raise an issue if you run into problems. |
Description of Changes
--declaration=falseto outputdist/es/index.d.tsfiles for use with volarCurrent Workaround
yarn add --dev @types/turf@turf/intersectshould be in the typing package@types/turf__intersectpackage for the auto search to workChecklist
npm testat the sub modules where changes have occurred.npm run lintto ensure code style at the turf module level.