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

[No QA] [TS migration] Migrate 'ComponentUtils' lib to TypeScript #26199

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
8 changes: 0 additions & 8 deletions src/libs/ComponentUtils/index.js

This file was deleted.

5 changes: 0 additions & 5 deletions src/libs/ComponentUtils/index.native.js

This file was deleted.

7 changes: 7 additions & 0 deletions src/libs/ComponentUtils/index.native.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import {AccessibilityRoleForm, NewPasswordAutocompleteType, PasswordAutocompleteType} from './types';

const PASSWORD_AUTOCOMPLETE_TYPE: PasswordAutocompleteType = 'password';
const NEW_PASSWORD_AUTOCOMPLETE_TYPE: NewPasswordAutocompleteType = 'password-new';
const ACCESSIBILITY_ROLE_FORM: AccessibilityRoleForm = 'none';

export {PASSWORD_AUTOCOMPLETE_TYPE, ACCESSIBILITY_ROLE_FORM, NEW_PASSWORD_AUTOCOMPLETE_TYPE};
10 changes: 10 additions & 0 deletions src/libs/ComponentUtils/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import {AccessibilityRoleForm, NewPasswordAutocompleteType, PasswordAutocompleteType} from './types';

/**
* Web password field needs `current-password` as autocomplete type which is not supported on native
*/
const PASSWORD_AUTOCOMPLETE_TYPE: PasswordAutocompleteType = 'current-password';
const NEW_PASSWORD_AUTOCOMPLETE_TYPE: NewPasswordAutocompleteType = 'new-password';
const ACCESSIBILITY_ROLE_FORM: AccessibilityRoleForm = 'form';

export {PASSWORD_AUTOCOMPLETE_TYPE, ACCESSIBILITY_ROLE_FORM, NEW_PASSWORD_AUTOCOMPLETE_TYPE};
5 changes: 5 additions & 0 deletions src/libs/ComponentUtils/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type PasswordAutocompleteType = 'current-password' | 'password';
type NewPasswordAutocompleteType = 'new-password' | 'password-new';
type AccessibilityRoleForm = 'form' | 'none';

export type {PasswordAutocompleteType, NewPasswordAutocompleteType, AccessibilityRoleForm};
Loading