Bug Report
I'm trying to use antlr4 in a project. I have this import:
import { CharStream, CommonTokenStream } from 'antlr4';
If I use "moduleResolution": "nodenext" it says "Module '"antlr4"' has no exported member 'CommonTokenStream'."
This is using TS 5.0.3.
I'd like to make a PR to antlr4 to fix this, but I'm not sure what the correct solution is. There's no obvious best-practice package authoring guidance in the TS docs.
What should be changed in antlr4's package.json? It has "type": "module", "main" and "types" fields. It doesn't seem like the docs are of any help here except that they say "types" is a "Fall-back for older versions of TypeScript". Does this mean "nodenext" completely ignores "types" and the only option would be for antlr4 to provide an export map, or what?
Bug Report
I'm trying to use
antlr4in a project. I have this import:If I use
"moduleResolution": "nodenext"it says "Module '"antlr4"' has no exported member 'CommonTokenStream'."This is using TS 5.0.3.
I'd like to make a PR to
antlr4to fix this, but I'm not sure what the correct solution is. There's no obvious best-practice package authoring guidance in the TS docs.What should be changed in
antlr4'spackage.json? It has"type": "module","main"and"types"fields. It doesn't seem like the docs are of any help here except that they say"types"is a "Fall-back for older versions of TypeScript". Does this mean"nodenext"completely ignores"types"and the only option would be forantlr4to provide an export map, or what?