diff --git a/index.d.cts b/index.d.cts deleted file mode 100644 index 4bece2d..0000000 --- a/index.d.cts +++ /dev/null @@ -1,48 +0,0 @@ -/* - * wasm-pack doesn't give us correct enough types. - */ - - - -interface Parsed { - type: 'expression' | 'class-member'; - tagName: 'template'; - contents: string; - range: { - start: number; - end: number; - }; - contentRange: { - start: number; - end: number; - }; - startRange: { - end: number; - start: number; - }; - endRange: { - start: number; - end: number; - }; -} - -class Preprocessor { - free(): void; -/** -*/ - constructor(); -/** -* @param {string} src -* @param {string | undefined} filename -* @returns {string} -*/ - process(src: string, filename?: string): string; -/** -* @param {string} src -* @param {string | undefined} filename -* @returns {any} -*/ - parse(src: string, filename?: string): Parsed; -} - -module.exports = { Preprocessor }; diff --git a/index.d.ts b/index.d.ts index 316a7de..58163e8 100644 --- a/index.d.ts +++ b/index.d.ts @@ -45,5 +45,5 @@ export class Preprocessor { * @param {string | undefined} filename * @returns {any} */ - parse(src: string, filename?: string): Parsed; + parse(src: string, filename?: string): Parsed[]; } diff --git a/package-lock.json b/package-lock.json index 9d4a405..0bf3765 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "content-tag", - "version": "1.1.2", + "version": "1.2.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "content-tag", - "version": "1.1.2", + "version": "1.2.1", "license": "MIT", "devDependencies": { "@arethetypeswrong/cli": "^0.13.2", diff --git a/package.json b/package.json index 1121969..d863a0f 100644 --- a/package.json +++ b/package.json @@ -10,15 +10,13 @@ "type": "module", "exports": { ".": { - "browser": { - "import": "./pkg/standalone.js" - }, "import": { "types": "./index.d.ts", + "browser": "./pkg/standalone.js", "default": "./pkg/node/content_tag.cjs" }, "require": { - "types": "./index.d.cts", + "types": "./index.d.ts", "default": "./pkg/node/content_tag.cjs" } } @@ -36,7 +34,7 @@ "ci:node": "mocha", "lint": "concurrently \"npm:lint:*(!fix)\" --names \"lint:\"", "lint:package": "publint", - "lint:published-types": "attw --pack --ignore-rules cjs-resolves-to-esm --ignore-rules false-esm", + "lint:published-types": "attw --pack --ignore-rules false-esm", "start": "vite", "test": "npm run ci:node" },