Skip to content

Commit

Permalink
fix(javascript): fix types not being recognized for NodeNext module r…
Browse files Browse the repository at this point in the history
…esolution (#4540)

* fix(javascript): fix types not being recognized for NodeNext module resolution

Signed-off-by: Gokhan Kurt <[email protected]>

* remove unnecessary exports

---------

Signed-off-by: Gokhan Kurt <[email protected]>
  • Loading branch information
KurtGokhan authored Jul 28, 2024
1 parent e8bf978 commit 2559349
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
11 changes: 8 additions & 3 deletions runtime/JavaScript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"browser": "dist/antlr4.web.mjs",
"main": "dist/antlr4.node.cjs",
"module": "dist/antlr4.node.mjs",
"types": "src/antlr4/index.d.ts",
"types": "src/antlr4/index.d.cts",
"repository": "antlr/antlr4.git",
"keywords": [
"lexer",
Expand All @@ -15,6 +15,11 @@
"antlr4",
"grammar"
],
"files": [
"dist",
"src/**/*.d.cts",
"src/**/*.d.ts"
],
"license": "BSD-3-Clause",
"bugs": {
"url": "https://github.com/antlr/antlr4/issues"
Expand Down Expand Up @@ -51,6 +56,7 @@
},
"exports": {
".": {
"types": "./src/antlr4/index.d.cts",
"node": {
"import": "./dist/antlr4.node.mjs",
"require": "./dist/antlr4.node.cjs",
Expand All @@ -60,8 +66,7 @@
"import": "./dist/antlr4.web.mjs",
"require": "./dist/antlr4.web.cjs",
"default": "./dist/antlr4.web.mjs"
},
"types": "./src/antlr4/index.d.ts"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ export * from "./CommonTokenStream";
export * from "./Recognizer";
export * from "./Lexer";
export * from "./Parser";
export * from './Token';
export * from "./Token";
export * from "./atn";
export * from "./dfa";
export * from "./context";
export * from './misc';
export * from './tree';
export * from './state';
export * from './error';
export * from './utils';
export * from './TokenStreamRewriter';
export * from "./misc";
export * from "./tree";
export * from "./state";
export * from "./error";
export * from "./utils";
export * from "./TokenStreamRewriter";

0 comments on commit 2559349

Please sign in to comment.