Merge branch 'react-update-for-1.6' of https://github.com/ccapndave/DefinitelyTyped into ccapndave-react-update-for-1.6

This commit is contained in:
vvakame
2015-10-07 01:59:41 +09:00
2 changed files with 19 additions and 9 deletions

View File

@@ -85,14 +85,19 @@ declare namespace __React {
// Reat.addons.update
// ----------------------------------------------------------------------
interface UpdateSpec {
interface UpdateSpecCommand {
$set?: any;
$merge?: {};
$apply?(value: any): any;
// [key: string]: UpdateSpec;
}
interface UpdateArraySpec extends UpdateSpec {
interface UpdateSpecPath {
[key: string]: UpdateSpec;
}
type UpdateSpec = UpdateSpecCommand | UpdateSpecPath;
interface UpdateArraySpec extends UpdateSpecCommand {
$push?: any[];
$unshift?: any[];
$splice?: any[][];

15
react/react.d.ts vendored
View File

@@ -1690,15 +1690,20 @@ declare module "react/addons" {
//
// Reat.addons.update
// ----------------------------------------------------------------------
interface UpdateSpec {
interface UpdateSpecCommand {
$set?: any;
$merge?: {};
$apply?(value: any): any;
// [key: string]: UpdateSpec;
}
interface UpdateArraySpec extends UpdateSpec {
interface UpdateSpecPath {
[key: string]: UpdateSpec;
}
type UpdateSpec = UpdateSpecCommand | UpdateSpecPath;
interface UpdateArraySpec extends UpdateSpecCommand {
$push?: any[];
$unshift?: any[];
$splice?: any[][];