Skip to content

Commit

Permalink
[TS migration] Migrate 'canFocusInputOnScreenFocus' lib to TypeScript
Browse files Browse the repository at this point in the history
  • Loading branch information
blazejkustra committed Sep 4, 2023
1 parent 5691303 commit 293d073
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 4 deletions.
3 changes: 0 additions & 3 deletions src/libs/canFocusInputOnScreenFocus/index.js

This file was deleted.

1 change: 0 additions & 1 deletion src/libs/canFocusInputOnScreenFocus/index.native.js

This file was deleted.

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

const canFocusInputOnScreenFocus: CanFocusInputOnScreenFocus = () => false;

export default canFocusInputOnScreenFocus;
6 changes: 6 additions & 0 deletions src/libs/canFocusInputOnScreenFocus/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import * as DeviceCapabilities from '../DeviceCapabilities';
import CanFocusInputOnScreenFocus from './types';

const canFocusInputOnScreenFocus: CanFocusInputOnScreenFocus = () => !DeviceCapabilities.canUseTouchScreen();

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

export default CanFocusInputOnScreenFocus;

0 comments on commit 293d073

Please sign in to comment.