Closed trmjoa closed 1 year ago
mmm.... not sure what happened @Tarjei400 Any chance you can look into this and submit a PR ?
@ericvergnaud I will take a look :+1:
@trmjoa @ericvergnaud Seems it came in review and my missunderstanding of types file. I think you are right and we should stick to reference src/antlr4/index.d.ts in type, and remove node/browser override. Could you take a look at pr?
@trmjoa Can you confirm if this change does not introduce other related issues ?
For reference, proper solution will be comming with this PR #4297
Hi. Sorry for the late reply. I have been off-grid for a while. I have tried locally changing the types pointer as in #4297, which seems to be an improvement. vscode/typescript compiler manages to resolve the file (as we would expect), but vscode is unable to resolved the named imports.
Example, when you click a named export in your generated parser, vscode will not manage to look the types for that export, something it usually does. Anyhow, #4297 fixes that its at least is a valid path.
Hi,
This PR introduces a bug in the npm package definition.
In the
exports
section of the package.json file the file referenced in thenode
/browser
sections does not exist.src/index.node.d.ts
andsrc/index.web.d.ts
does not exist in the shipped package. All files in thesrc
directory in the released module is located insrc/antlr4
, and even here there is no combined definition files.Unless you create a combined file the intention is maybe to point this path at
src/antlr4/index.d.ts
?