Convert more packages to types-2.0 style

This commit is contained in:
Andy Hanson
2016-11-04 13:48:19 -07:00
parent c016b5b79f
commit a1fbe3bc3f
37 changed files with 730 additions and 566 deletions
+13 -18
View File
@@ -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";
+19
View File
@@ -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"
]
}