diff --git a/react-copy-to-clipboard/index.d.ts b/react-copy-to-clipboard/index.d.ts new file mode 100644 index 0000000000..1b0c9e942e --- /dev/null +++ b/react-copy-to-clipboard/index.d.ts @@ -0,0 +1,30 @@ +// Type definitions for react-copy-to-clipboard 4.2 +// Project: https://github.com/nkbt/react-copy-to-clipboard +// Definitions by: Meno Abels +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.1 + +import * as React from "react"; + +export as namespace CopyToClipboard; + +export = CopyToClipboard; + +declare namespace CopyToClipboard { + + export interface Options { + debug: boolean; + message: string; + } + + export interface Props { + text: string; + onCopy?: (a: string) => void, + options?: Options; + } + +} + +declare class CopyToClipboard extends React.Component { +} + diff --git a/react-copy-to-clipboard/react-copy-to-clipboard-tests.tsx b/react-copy-to-clipboard/react-copy-to-clipboard-tests.tsx new file mode 100644 index 0000000000..195e7a8ceb --- /dev/null +++ b/react-copy-to-clipboard/react-copy-to-clipboard-tests.tsx @@ -0,0 +1,14 @@ + +import * as React from "react"; +import * as CopyToClipboard from "react-copy-to-clipboard"; + +export class Test extends React.Component { + render() { + return ( + {}}> + Copy to clipboard with span + + ); + } +} diff --git a/react-copy-to-clipboard/tsconfig.json b/react-copy-to-clipboard/tsconfig.json new file mode 100644 index 0000000000..a4e09d1242 --- /dev/null +++ b/react-copy-to-clipboard/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "baseUrl": "../", + "jsx": "react", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + }, + "files": [ + "index.d.ts", + "react-copy-to-clipboard-tests.tsx" + ] +} diff --git a/react-copy-to-clipboard/tslint.json b/react-copy-to-clipboard/tslint.json new file mode 100644 index 0000000000..377cc837d4 --- /dev/null +++ b/react-copy-to-clipboard/tslint.json @@ -0,0 +1 @@ +{ "extends": "../tslint.json" }