diff --git a/runtime/JavaScript/package.json b/runtime/JavaScript/package.json index 007e7ac436..ad3e3e472d 100644 --- a/runtime/JavaScript/package.json +++ b/runtime/JavaScript/package.json @@ -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", @@ -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" @@ -51,6 +56,7 @@ }, "exports": { ".": { + "types": "./src/antlr4/index.d.cts", "node": { "import": "./dist/antlr4.node.mjs", "require": "./dist/antlr4.node.cjs", @@ -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" + } } } } diff --git a/runtime/JavaScript/src/antlr4/index.d.ts b/runtime/JavaScript/src/antlr4/index.d.cts similarity index 68% rename from runtime/JavaScript/src/antlr4/index.d.ts rename to runtime/JavaScript/src/antlr4/index.d.cts index 3c6c9bcf8b..cf0e262bdd 100644 --- a/runtime/JavaScript/src/antlr4/index.d.ts +++ b/runtime/JavaScript/src/antlr4/index.d.cts @@ -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";