From 2690b9c7c835a12ccbfc76b51ad4fefe3e608d41 Mon Sep 17 00:00:00 2001 From: El Youssoufi Naoufal Date: Thu, 21 Dec 2017 23:15:30 +0000 Subject: [PATCH 1/3] react-native: adding visible-password keyboardType --- types/react-native/index.d.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index a1634eac57..2dd574507c 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -5,6 +5,7 @@ // Kyle Roach // Tim Wang // Kamal Mahyuddin +// Naoufal El Yousfi // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.3 @@ -1045,6 +1046,7 @@ export type KeyboardTypeIOS = | "decimal-pad" | "twitter" | "web-search"; +export type KeyboardTypeAndroid = "visible-password"; export type ReturnKeyType = "done" | "go" | "next" | "search" | "send"; export type ReturnKeyTypeAndroid = "none" | "previous"; @@ -1097,11 +1099,13 @@ export interface TextInputProperties editable?: boolean; /** - * enum("default", 'numeric', 'email-address', "ascii-capable", 'numbers-and-punctuation', 'url', 'number-pad', 'phone-pad', 'name-phone-pad', 'decimal-pad', 'twitter', 'web-search') + * enum("default", 'numeric', 'email-address', "ascii-capable", 'numbers-and-punctuation', 'url', 'number-pad', 'phone-pad', 'name-phone-pad', 'decimal-pad', 'twitter', 'web-search', 'visible-password') * Determines which keyboard to open, e.g.numeric. * The following values work across platforms: - default - numeric - email-address - phone-pad + * The following values work on iOS: - ascii-capable - numbers-and-punctuation - url - number-pad - name-phone-pad - decimal-pad - twitter - web-search + * The following values work on Android: - visible-password */ - keyboardType?: KeyboardType | KeyboardTypeIOS; + keyboardType?: KeyboardType | KeyboardTypeIOS | KeyboardTypeAndroid; /** * Limits the maximum number of characters that can be entered. From 9a204103dbd7f3d9bbe85076b6d9d8f0ca55b1db Mon Sep 17 00:00:00 2001 From: El Youssoufi Naoufal Date: Thu, 21 Dec 2017 23:45:12 +0000 Subject: [PATCH 2/3] Fixing lint --- types/react-native/index.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index 2dd574507c..362cd41478 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -1099,7 +1099,8 @@ export interface TextInputProperties editable?: boolean; /** - * enum("default", 'numeric', 'email-address', "ascii-capable", 'numbers-and-punctuation', 'url', 'number-pad', 'phone-pad', 'name-phone-pad', 'decimal-pad', 'twitter', 'web-search', 'visible-password') + * enum("default", 'numeric', 'email-address', "ascii-capable", 'numbers-and-punctuation', 'url', 'number-pad', 'phone-pad', 'name-phone-pad', + * 'decimal-pad', 'twitter', 'web-search', 'visible-password') * Determines which keyboard to open, e.g.numeric. * The following values work across platforms: - default - numeric - email-address - phone-pad * The following values work on iOS: - ascii-capable - numbers-and-punctuation - url - number-pad - name-phone-pad - decimal-pad - twitter - web-search From 85d5b85df01011fb0b329d28e4567fb9b7de0074 Mon Sep 17 00:00:00 2001 From: El Youssoufi Naoufal Date: Thu, 21 Dec 2017 23:50:25 +0000 Subject: [PATCH 3/3] Fixing lint --- types/react-native/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/react-native/index.d.ts b/types/react-native/index.d.ts index 362cd41478..c6e683ebd4 100644 --- a/types/react-native/index.d.ts +++ b/types/react-native/index.d.ts @@ -1099,7 +1099,7 @@ export interface TextInputProperties editable?: boolean; /** - * enum("default", 'numeric', 'email-address', "ascii-capable", 'numbers-and-punctuation', 'url', 'number-pad', 'phone-pad', 'name-phone-pad', + * enum("default", 'numeric', 'email-address', "ascii-capable", 'numbers-and-punctuation', 'url', 'number-pad', 'phone-pad', 'name-phone-pad', * 'decimal-pad', 'twitter', 'web-search', 'visible-password') * Determines which keyboard to open, e.g.numeric. * The following values work across platforms: - default - numeric - email-address - phone-pad