Skip to content

Commit

Permalink
Merge pull request #9 from dprokop/add-dts
Browse files Browse the repository at this point in the history
Add typescript declaration file
  • Loading branch information
christo-pr authored Jul 17, 2020
2 parents e4bd09f + c46fd1a commit 18f07e1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
declare module 'dangerously-set-html-content' {
import React from 'react';

interface DangerouslySetHtmlContentProps extends React.HTMLAttributes<HTMLDivElement> {
html: string;
}

class DangerouslySetHtmlContent extends React.Component<DangerouslySetHtmlContentProps, any> {}

export = DangerouslySetHtmlContent;
}

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"repository": "christo-pr/dangerously-set-html-content",
"main": "dist/index.js",
"module": "dist/index.es.js",
"types": "index.d.ts",
"jsnext:main": "dist/index.es.js",
"keywords": [
"reactjs",
Expand Down

0 comments on commit 18f07e1

Please sign in to comment.