Skip to content

Commit

Permalink
Add type definitions for acorn.mjs (#954)
Browse files Browse the repository at this point in the history
For TypeScript projects that use the acorn.mjs distribution bundle,
a separate `.mjs.d.ts` needs to be added to the folder. This was
suggested in microsoft/TypeScript#27957 (comment).
  • Loading branch information
TimvdLippe committed May 29, 2020
1 parent 304ae5e commit f66c4e7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .gitignore
Expand Up @@ -4,7 +4,9 @@
/.tern-port
/local
/bin/_acorn.js
/acorn/dist
/acorn/dist/*
/acorn-loose/dist
/acorn-walk/dist
/yarn.lock
!/acorn/dist/acorn.d.ts
!/acorn/dist/acorn.mjs.d.ts
2 changes: 2 additions & 0 deletions acorn/dist/acorn.mjs.d.ts
@@ -0,0 +1,2 @@
import * as acorn from "./acorn";
export = acorn;

0 comments on commit f66c4e7

Please sign in to comment.