From 489156cadf4978ee6289149efa05607fb84161bf Mon Sep 17 00:00:00 2001 From: Libin Lu Date: Fri, 10 Mar 2017 19:23:23 -0500 Subject: [PATCH] [react-native] add dismiss() for Keyboard (#14665) * add some art definition * react-native add dismiss function for Keyboard * add dismiss() for Keyboard react native --- react-native/index.d.ts | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/react-native/index.d.ts b/react-native/index.d.ts index 93059b5134..903daa144c 100644 --- a/react-native/index.d.ts +++ b/react-native/index.d.ts @@ -7973,6 +7973,34 @@ declare module "react" { */ cropImage( uri: string, cropData: ImageCropData, success: (uri: string) => void, failure: (error: Object) => void ): void } + + export interface ARTShapeProps { + d: string, + strokeWidth: number, + strokeDash?: number, + stroke: string + } + + export interface ARTSurfaceProps { + style: ViewStyle, + width: number, + height: number + } + + export interface ShapeStatic extends React.ComponentClass { + } + + export interface SurfaceStatic extends React.ComponentClass { + } + + export interface ARTStatic { + Shape: ShapeStatic, + Surface: SurfaceStatic + } + + export interface KeyboardStatic extends NativeEventEmitter { + dismiss: ()=>void + } ////////////////////////////////////////////////////////////////////////// // @@ -7982,6 +8010,8 @@ declare module "react" { // TODO: The following components need to be added // - [ ] ART + export var ART: ARTStatic + export type ART = ARTStatic export var ActivityIndicator: ActivityIndicatorStatic export type ActivityIndicator = ActivityIndicatorStatic @@ -8162,7 +8192,7 @@ declare module "react" { export var IntentAndroid: IntentAndroidStatic export type IntentAndroid = IntentAndroidStatic - export var Keyboard: NativeEventEmitter + export var Keyboard: KeyboardStatic export var KeyboardAvoidingView: KeyboardAvoidingViewStatic export type KeyboardAvoidingView = KeyboardAvoidingViewStatic