Skip to content

Commit

Permalink
Merge pull request #7 from github/add-typescript-definition-file
Browse files Browse the repository at this point in the history
Add typescript definition file
  • Loading branch information
koddsson authored Jul 24, 2019
2 parents 5ded687 + 5d8783d commit 165cfd7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function setForm(event: Event): void;
export function restoreResumableFields(id: string, options?: {keyPrefix?: string}): void;
export function persistResumableFields(id: string, options?: {selector?: string, keyPrefix?: string}): void;
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Annotate fields to be persisted on navigation away from the current page.",
"main": "dist/session-resume.umd.js",
"module": "dist/session-resume.esm.js",
"types": "index.d.ts",
"repository": "github/session-resume",
"scripts": {
"build": "rollup -c && cp session-resume.js.flow dist/session-resume.esm.js.flow && cp session-resume.js.flow dist/session-resume.umd.js.flow",
Expand All @@ -15,7 +16,8 @@
"prepublishOnly": "npm run build"
},
"files": [
"dist"
"dist",
"index.d.ts"
],
"keywords": [],
"author": "",
Expand Down

0 comments on commit 165cfd7

Please sign in to comment.