microsoft/vscode-react-native
Publicmirrored fromhttps://github.com/microsoft/vscode-react-nativeAvailable
ReactTypings/react/react-addons-linked-state-mixin.d.ts
32lines · modecode
| 1 | // Type definitions for React v0.14 (react-addons-linked-state-mixin) |
| 2 | // Project: http://facebook.github.io/react/ |
| 3 | // Definitions by: Asana <https://asana.com>, AssureSign <http://www.assuresign.com>, Microsoft <https://microsoft.com> |
| 4 | // Definitions: https://github.com/borisyankov/DefinitelyTyped |
| 5 | |
| 6 | /// <reference path="react.d.ts" /> |
| 7 | |
| 8 | declare namespace __React { |
| 9 | interface ReactLink<T> { |
| 10 | value: T; |
| 11 | requestChange(newValue: T): void; |
| 12 | } |
| 13 | |
| 14 | interface LinkedStateMixin extends Mixin<any, any> { |
| 15 | linkState<T>(key: string): ReactLink<T>; |
| 16 | } |
| 17 | |
| 18 | interface HTMLAttributes { |
| 19 | checkedLink?: ReactLink<boolean>; |
| 20 | valueLink?: ReactLink<boolean | string | number>; |
| 21 | } |
| 22 | |
| 23 | namespace __Addons { |
| 24 | export var LinkedStateMixin: LinkedStateMixin; |
| 25 | } |
| 26 | } |
| 27 | |
| 28 | declare module "react-addons-linked-state-mixin" { |
| 29 | var LinkedStateMixin: __React.LinkedStateMixin; |
| 30 | type LinkedStateMixin = __React.LinkedStateMixin; |
| 31 | export = LinkedStateMixin; |
| 32 | } |
| 33 | |