diff --git a/react-copy-to-clipboard/index.d.ts b/react-copy-to-clipboard/index.d.ts index a3dbdb9506..ffc6609b4d 100644 --- a/react-copy-to-clipboard/index.d.ts +++ b/react-copy-to-clipboard/index.d.ts @@ -19,6 +19,7 @@ declare namespace CopyToClipboard { export interface Props { text: string; + onCopy: (a: string) => void, options?: Options; } diff --git a/react-copy-to-clipboard/react-copy-to-clipboard-tests.tsx b/react-copy-to-clipboard/react-copy-to-clipboard-tests.tsx index a92ae38f8a..195e7a8ceb 100644 --- a/react-copy-to-clipboard/react-copy-to-clipboard-tests.tsx +++ b/react-copy-to-clipboard/react-copy-to-clipboard-tests.tsx @@ -1,12 +1,12 @@ import * as React from "react"; -import CopyToClipboard from "react-copy-to-clipboard"; +import * as CopyToClipboard from "react-copy-to-clipboard"; export class Test extends React.Component { render() { return ( this.setState({copied: true})}> + onCopy={() => {}}> Copy to clipboard with span ); diff --git a/react-copy-to-clipboard/tsconfig.json b/react-copy-to-clipboard/tsconfig.json index b3d366ea83..a4e09d1242 100644 --- a/react-copy-to-clipboard/tsconfig.json +++ b/react-copy-to-clipboard/tsconfig.json @@ -9,13 +9,13 @@ "noImplicitThis": true, "strictNullChecks": true, "baseUrl": "../", + "jsx": "react", "typeRoots": [ "../" ], "types": [], "noEmit": true, - "forceConsistentCasingInFileNames": true, - "jsx": "react" + "forceConsistentCasingInFileNames": true }, "files": [ "index.d.ts",