From c46fd1a5973ae823f3bee944f13cb3c2270ba6b8 Mon Sep 17 00:00:00 2001 From: Dominik Prokop Date: Fri, 17 Jul 2020 17:53:25 +0200 Subject: [PATCH] Add typescript declaration file --- index.d.ts | 12 ++++++++++++ package.json | 1 + 2 files changed, 13 insertions(+) create mode 100644 index.d.ts diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..078f3f5 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,12 @@ +declare module 'dangerously-set-html-content' { + import React from 'react'; + + interface DangerouslySetHtmlContentProps extends React.HTMLAttributes { + html: string; + } + + class DangerouslySetHtmlContent extends React.Component {} + + export = DangerouslySetHtmlContent; + } + \ No newline at end of file diff --git a/package.json b/package.json index 58a0f2d..dc7cc88 100644 --- a/package.json +++ b/package.json @@ -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",