diff --git a/src/libs/getPlatform/index.android.js b/src/libs/getPlatform/index.android.js deleted file mode 100644 index 1a343700a2f9..000000000000 --- a/src/libs/getPlatform/index.android.js +++ /dev/null @@ -1,5 +0,0 @@ -import CONST from '../../CONST'; - -export default function getPlatform() { - return CONST.PLATFORM.ANDROID; -} diff --git a/src/libs/getPlatform/index.android.ts b/src/libs/getPlatform/index.android.ts new file mode 100644 index 000000000000..14ed65ace19d --- /dev/null +++ b/src/libs/getPlatform/index.android.ts @@ -0,0 +1,6 @@ +import CONST from '../../CONST'; +import Platform from './types'; + +export default function getPlatform(): Platform { + return CONST.PLATFORM.ANDROID; +} diff --git a/src/libs/getPlatform/index.desktop.js b/src/libs/getPlatform/index.desktop.js deleted file mode 100644 index c00ea00fd645..000000000000 --- a/src/libs/getPlatform/index.desktop.js +++ /dev/null @@ -1,5 +0,0 @@ -import CONST from '../../CONST'; - -export default function getPlatform() { - return CONST.PLATFORM.DESKTOP; -} diff --git a/src/libs/getPlatform/index.desktop.ts b/src/libs/getPlatform/index.desktop.ts new file mode 100644 index 000000000000..c9f5720c541d --- /dev/null +++ b/src/libs/getPlatform/index.desktop.ts @@ -0,0 +1,6 @@ +import CONST from '../../CONST'; +import Platform from './types'; + +export default function getPlatform(): Platform { + return CONST.PLATFORM.DESKTOP; +} diff --git a/src/libs/getPlatform/index.ios.js b/src/libs/getPlatform/index.ios.js deleted file mode 100644 index d91604a5c41a..000000000000 --- a/src/libs/getPlatform/index.ios.js +++ /dev/null @@ -1,5 +0,0 @@ -import CONST from '../../CONST'; - -export default function getPlatform() { - return CONST.PLATFORM.IOS; -} diff --git a/src/libs/getPlatform/index.ios.ts b/src/libs/getPlatform/index.ios.ts new file mode 100644 index 000000000000..8c21189b92e7 --- /dev/null +++ b/src/libs/getPlatform/index.ios.ts @@ -0,0 +1,6 @@ +import CONST from '../../CONST'; +import Platform from './types'; + +export default function getPlatform(): Platform { + return CONST.PLATFORM.IOS; +} diff --git a/src/libs/getPlatform/index.ts b/src/libs/getPlatform/index.ts new file mode 100644 index 000000000000..c53963f5b80f --- /dev/null +++ b/src/libs/getPlatform/index.ts @@ -0,0 +1,6 @@ +import CONST from '../../CONST'; +import Platform from './types'; + +export default function getPlatform(): Platform { + return CONST.PLATFORM.WEB; +} diff --git a/src/libs/getPlatform/index.website.js b/src/libs/getPlatform/index.website.js deleted file mode 100644 index 8b7e99c13c10..000000000000 --- a/src/libs/getPlatform/index.website.js +++ /dev/null @@ -1,5 +0,0 @@ -import CONST from '../../CONST'; - -export default function getPlatform() { - return CONST.PLATFORM.WEB; -} diff --git a/src/libs/getPlatform/types.ts b/src/libs/getPlatform/types.ts new file mode 100644 index 000000000000..ceddb4e17224 --- /dev/null +++ b/src/libs/getPlatform/types.ts @@ -0,0 +1,6 @@ +import {ValueOf} from 'type-fest'; +import CONST from '../../CONST'; + +type Platform = ValueOf; + +export default Platform;