diff --git a/types/react-no-ssr/index.d.ts b/types/react-no-ssr/index.d.ts new file mode 100644 index 0000000000..77d52af1ff --- /dev/null +++ b/types/react-no-ssr/index.d.ts @@ -0,0 +1,11 @@ +// Type definitions for react-no-ssr 1.1 +// Project: https://github.com/kadirahq/react-no-ssr +// Definitions by: RafaƂ Filipek +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.6 + +import * as React from 'react'; + +export default class NoSSR extends React.Component<{ + onSSR?: React.ReactChild; +}> {} diff --git a/types/react-no-ssr/react-no-ssr-tests.tsx b/types/react-no-ssr/react-no-ssr-tests.tsx new file mode 100644 index 0000000000..62ad9b1989 --- /dev/null +++ b/types/react-no-ssr/react-no-ssr-tests.tsx @@ -0,0 +1,17 @@ +import * as React from 'react'; +import NoSSR from 'react-no-ssr'; + +export class NoSSRTest extends React.Component { + render() { + return ( +
+ +
+ + }> +
+ +
+ ); + } +} diff --git a/types/react-no-ssr/tsconfig.json b/types/react-no-ssr/tsconfig.json new file mode 100644 index 0000000000..23e59891d8 --- /dev/null +++ b/types/react-no-ssr/tsconfig.json @@ -0,0 +1,18 @@ +{ + "files": ["index.d.ts", "react-no-ssr-tests.tsx"], + "compilerOptions": { + "module": "commonjs", + "lib": ["es6", "dom"], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "jsx": "react", + "experimentalDecorators": true, + "typeRoots": ["../"], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true + } +} diff --git a/types/react-no-ssr/tslint.json b/types/react-no-ssr/tslint.json new file mode 100644 index 0000000000..3db14f85ea --- /dev/null +++ b/types/react-no-ssr/tslint.json @@ -0,0 +1 @@ +{ "extends": "dtslint/dt.json" }