mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 04:01:52 +00:00
Convert more packages to types-2.0 style
This commit is contained in:
Vendored
+13
-18
@@ -3,25 +3,20 @@
|
||||
// Definitions by: Remo H. Jansen <https://github.com/remojansen/>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
/// <reference path="../react/react.d.ts"/>
|
||||
import React = require("react");
|
||||
|
||||
declare module "react-side-effect" {
|
||||
declare function withSideEffect(
|
||||
reducePropsToState: (propsList: any[]) => any,
|
||||
handleStateChangeOnClient: (state: any) => any,
|
||||
mapStateOnServer?: (state: any) => any
|
||||
): ClassDecorator;
|
||||
|
||||
import React = __React;
|
||||
declare class ElementClass extends React.Component<any, any> {}
|
||||
|
||||
function withSideEffect(
|
||||
reducePropsToState: (propsList: any[]) => any,
|
||||
handleStateChangeOnClient: (state: any) => any,
|
||||
mapStateOnServer?: (state: any) => any
|
||||
): ClassDecorator;
|
||||
|
||||
class ElementClass extends React.Component<any, any> {}
|
||||
|
||||
interface ClassDecorator {
|
||||
<T extends (typeof ElementClass)>(component:T): T;
|
||||
}
|
||||
|
||||
namespace withSideEffect {} // https://github.com/Microsoft/TypeScript/issues/5073
|
||||
|
||||
export = withSideEffect;
|
||||
interface ClassDecorator {
|
||||
<T extends (typeof ElementClass)>(component:T): T;
|
||||
}
|
||||
|
||||
declare namespace withSideEffect {} // https://github.com/Microsoft/TypeScript/issues/5073
|
||||
|
||||
export = withSideEffect;
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
/// <reference path="react-side-effect.d.ts" />
|
||||
|
||||
import * as React from "react";
|
||||
import * as withSideEffect from "react-side-effect";
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es6",
|
||||
"noImplicitAny": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"react-side-effect-tests.ts"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user