From 293d0739d11e4025a40748dca51323a0e695893b Mon Sep 17 00:00:00 2001 From: Blazej Kustra Date: Mon, 4 Sep 2023 16:47:40 +0200 Subject: [PATCH] [TS migration] Migrate 'canFocusInputOnScreenFocus' lib to TypeScript --- src/libs/canFocusInputOnScreenFocus/index.js | 3 --- src/libs/canFocusInputOnScreenFocus/index.native.js | 1 - src/libs/canFocusInputOnScreenFocus/index.native.ts | 5 +++++ src/libs/canFocusInputOnScreenFocus/index.ts | 6 ++++++ src/libs/canFocusInputOnScreenFocus/types.ts | 3 +++ 5 files changed, 14 insertions(+), 4 deletions(-) delete mode 100644 src/libs/canFocusInputOnScreenFocus/index.js delete mode 100644 src/libs/canFocusInputOnScreenFocus/index.native.js create mode 100644 src/libs/canFocusInputOnScreenFocus/index.native.ts create mode 100644 src/libs/canFocusInputOnScreenFocus/index.ts create mode 100644 src/libs/canFocusInputOnScreenFocus/types.ts diff --git a/src/libs/canFocusInputOnScreenFocus/index.js b/src/libs/canFocusInputOnScreenFocus/index.js deleted file mode 100644 index c930c0d944ec..000000000000 --- a/src/libs/canFocusInputOnScreenFocus/index.js +++ /dev/null @@ -1,3 +0,0 @@ -import * as DeviceCapabilities from '../DeviceCapabilities'; - -export default () => !DeviceCapabilities.canUseTouchScreen(); diff --git a/src/libs/canFocusInputOnScreenFocus/index.native.js b/src/libs/canFocusInputOnScreenFocus/index.native.js deleted file mode 100644 index eae5767cffbc..000000000000 --- a/src/libs/canFocusInputOnScreenFocus/index.native.js +++ /dev/null @@ -1 +0,0 @@ -export default () => false; diff --git a/src/libs/canFocusInputOnScreenFocus/index.native.ts b/src/libs/canFocusInputOnScreenFocus/index.native.ts new file mode 100644 index 000000000000..79d711c49fa6 --- /dev/null +++ b/src/libs/canFocusInputOnScreenFocus/index.native.ts @@ -0,0 +1,5 @@ +import CanFocusInputOnScreenFocus from './types'; + +const canFocusInputOnScreenFocus: CanFocusInputOnScreenFocus = () => false; + +export default canFocusInputOnScreenFocus; diff --git a/src/libs/canFocusInputOnScreenFocus/index.ts b/src/libs/canFocusInputOnScreenFocus/index.ts new file mode 100644 index 000000000000..be500074d7e3 --- /dev/null +++ b/src/libs/canFocusInputOnScreenFocus/index.ts @@ -0,0 +1,6 @@ +import * as DeviceCapabilities from '../DeviceCapabilities'; +import CanFocusInputOnScreenFocus from './types'; + +const canFocusInputOnScreenFocus: CanFocusInputOnScreenFocus = () => !DeviceCapabilities.canUseTouchScreen(); + +export default canFocusInputOnScreenFocus; diff --git a/src/libs/canFocusInputOnScreenFocus/types.ts b/src/libs/canFocusInputOnScreenFocus/types.ts new file mode 100644 index 000000000000..5a65e5e7d198 --- /dev/null +++ b/src/libs/canFocusInputOnScreenFocus/types.ts @@ -0,0 +1,3 @@ +type CanFocusInputOnScreenFocus = () => boolean; + +export default CanFocusInputOnScreenFocus;