diff --git a/types/react-document-meta/index.d.ts b/types/react-document-meta/index.d.ts new file mode 100644 index 0000000000..3f11c36246 --- /dev/null +++ b/types/react-document-meta/index.d.ts @@ -0,0 +1,17 @@ +// Type definitions for react-document-meta 3.0 +// Project: https://github.com/kodyl/react-document-meta#readme +// Definitions by: ulrichb +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.8 + +import * as React from 'react'; + +export interface DocumentMetaProps { + readonly title?: string; + readonly description?: string; + readonly canonical?: string; +} + +declare class DocumentMeta extends React.Component { } + +export default DocumentMeta; diff --git a/types/react-document-meta/react-document-meta-tests.tsx b/types/react-document-meta/react-document-meta-tests.tsx new file mode 100644 index 0000000000..79ba01a2b2 --- /dev/null +++ b/types/react-document-meta/react-document-meta-tests.tsx @@ -0,0 +1,22 @@ +import * as React from 'react'; +import DocumentMeta from 'react-document-meta'; + +class Test extends React.Component { + render() { + return ( + +
some child
+
+ ); + } +} + +class TestWithDefaultProps extends React.Component { + render() { + return ( + +
some child
+
+ ); + } +} diff --git a/types/react-document-meta/tsconfig.json b/types/react-document-meta/tsconfig.json new file mode 100644 index 0000000000..9970e64e73 --- /dev/null +++ b/types/react-document-meta/tsconfig.json @@ -0,0 +1,25 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6", + "dom" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "jsx": "react" + }, + "files": [ + "index.d.ts", + "react-document-meta-tests.tsx" + ] +} diff --git a/types/react-document-meta/tslint.json b/types/react-document-meta/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/react-document-meta/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }