Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TS migration] Migrate 'getSecureEntryKeyboardType' lib to TypeScript #26673

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions src/libs/getSecureEntryKeyboardType/index.android.js

This file was deleted.

11 changes: 11 additions & 0 deletions src/libs/getSecureEntryKeyboardType/index.android.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import CONST from '../../CONST';
import GetSecureEntryKeyboardType from './types';

/**
* Return visible-password keyboard type when secure text is visible on Android,
* otherwise return keyboardType passed as function parameter
*/
const getSecureEntryKeyboardType: GetSecureEntryKeyboardType = (keyboardType, secureTextEntry, passwordHidden) =>
secureTextEntry && !passwordHidden ? CONST.KEYBOARD_TYPE.VISIBLE_PASSWORD : keyboardType;

export default getSecureEntryKeyboardType;
6 changes: 0 additions & 6 deletions src/libs/getSecureEntryKeyboardType/index.js

This file was deleted.

8 changes: 8 additions & 0 deletions src/libs/getSecureEntryKeyboardType/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import GetSecureEntryKeyboardType from './types';

/**
* Return keyboardType passed as function parameter on Web/Desktop/iOS
*/
const getSecureEntryKeyboardType: GetSecureEntryKeyboardType = (keyboardType) => keyboardType;

export default getSecureEntryKeyboardType;
3 changes: 3 additions & 0 deletions src/libs/getSecureEntryKeyboardType/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
type GetSecureEntryKeyboardType = (keyboardType: string, secureTextEntry: boolean, passwordHidden: boolean) => string;

export default GetSecureEntryKeyboardType;
Loading