mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-12 19:59:02 +08:00
committed by
Sheetal Nandi
parent
e425a450ce
commit
b6f7118f87
11
types/react-no-ssr/index.d.ts
vendored
Normal file
11
types/react-no-ssr/index.d.ts
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
// Type definitions for react-no-ssr 1.1
|
||||
// Project: https://github.com/kadirahq/react-no-ssr
|
||||
// Definitions by: Rafał Filipek <https://github.com/rafalfilipek>
|
||||
// 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;
|
||||
}> {}
|
||||
17
types/react-no-ssr/react-no-ssr-tests.tsx
Normal file
17
types/react-no-ssr/react-no-ssr-tests.tsx
Normal file
@@ -0,0 +1,17 @@
|
||||
import * as React from 'react';
|
||||
import NoSSR from 'react-no-ssr';
|
||||
|
||||
export class NoSSRTest extends React.Component {
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
<NoSSR>
|
||||
<div />
|
||||
</NoSSR>
|
||||
<NoSSR onSSR={<span />}>
|
||||
<div />
|
||||
</NoSSR>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
18
types/react-no-ssr/tsconfig.json
Normal file
18
types/react-no-ssr/tsconfig.json
Normal file
@@ -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
|
||||
}
|
||||
}
|
||||
1
types/react-no-ssr/tslint.json
Normal file
1
types/react-no-ssr/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user