Skip to content

Commit

Permalink
Merge pull request #21 from parkerziegler/task/add-typescript-defs
Browse files Browse the repository at this point in the history
Add TypeScript definitions.
  • Loading branch information
parkerziegler authored Oct 16, 2019
2 parents 117b821 + a8d9dde commit 4f0f348
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
10 changes: 10 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
declare module 'react-ssr-prepass' {
type Visitor = (
element: React.ElementType<any>,
instance?: React.Component<any, any>
) => void | Promise<any>

function ssrPrepass(node: React.ReactNode, visitor?: Visitor): Promise<void>

export = ssrPrepass
}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@
"files": [
"index.js",
"index.js.flow",
"dist"
"dist",
"index.d.ts"
],
"types": "index.d.ts",
"scripts": {
"prepublishOnly": "run-s build",
"build": "rollup -c rollup.config.js",
Expand Down

0 comments on commit 4f0f348

Please sign in to comment.