@types/react-addons-update
Version:
TypeScript definitions for react-addons-update
48 lines (36 loc) • 1.46 kB
Markdown
# Installation
> `npm install --save @types/react-addons-update`
# Summary
This package contains type definitions for react-addons-update (http://facebook.github.io/react/).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-addons-update.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-addons-update/index.d.ts)
````ts
import * as React from "react";
export = React.__Addons.update;
declare module "react" {
interface UpdateSpecCommand {
$set?: any;
$merge?: {} | undefined;
$apply?(value: any): any;
}
interface UpdateSpecPath {
[key: string]: UpdateSpec;
}
type UpdateSpec = number[][] | UpdateSpecCommand | UpdateSpecPath;
interface UpdateArraySpec extends UpdateSpecCommand {
$push?: any[] | undefined;
$unshift?: any[] | undefined;
$splice?: any[][] | undefined;
}
namespace __Addons {
export function update(value: any[], spec: UpdateArraySpec): any[];
export function update(value: {}, spec: UpdateSpec): any;
}
}
````
### Additional Details
* Last updated: Tue, 07 Nov 2023 09:09:39 GMT
* Dependencies: [@types/react](https://npmjs.com/package/@types/react)
# Credits
These definitions were written by [Asana](https://asana.com), [AssureSign](http://www.assuresign.com), and [Microsoft](https://microsoft.com).