Skip to content

Commit

Permalink
feat: add TypeScript types (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Nov 1, 2020
1 parent 0477548 commit 372c27f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
9 changes: 9 additions & 0 deletions lexer.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
interface Exports {
exports: string[];
reexports: string[];
}

export declare function parse(source: string, name?: string): Exports;
export declare function init(): Promise<void>;

export {};
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"import": "./dist/lexer.mjs",
"default": "./lexer.js"
},
"types": "lexer.d.ts",
"scripts": {
"test-js": "mocha -b -u tdd test/*.js",
"test-wasm": "WASM=1 mocha -b -u tdd test/*.js",
Expand All @@ -28,7 +29,8 @@
"terser": "^4.1.4"
},
"files": [
"dist"
"dist",
"lexer.d.ts"
],
"repository": {
"type": "git",
Expand Down

0 comments on commit 372c27f

Please sign in to comment.