diff --git a/src/libs/StartupTimer/index.js b/src/libs/StartupTimer/index.js deleted file mode 100644 index 7b53266e50d9..000000000000 --- a/src/libs/StartupTimer/index.js +++ /dev/null @@ -1,7 +0,0 @@ -/** - * Web noop as there is no "startup" to time from the native layer. - */ - -export default { - stop() {}, -}; diff --git a/src/libs/StartupTimer/index.native.js b/src/libs/StartupTimer/index.native.js deleted file mode 100644 index 29bbef8cfe3d..000000000000 --- a/src/libs/StartupTimer/index.native.js +++ /dev/null @@ -1,12 +0,0 @@ -import {NativeModules} from 'react-native'; - -/** - * Stop the startup trace for the app. - */ -function stop() { - NativeModules.StartupTimer.stop(); -} - -export default { - stop, -}; diff --git a/src/libs/StartupTimer/index.native.ts b/src/libs/StartupTimer/index.native.ts new file mode 100644 index 000000000000..52ba55076fc1 --- /dev/null +++ b/src/libs/StartupTimer/index.native.ts @@ -0,0 +1,13 @@ +import {NativeModules} from 'react-native'; +import StartupTimer from './types'; + +/** + * Stop the startup trace for the app. + */ +const startupTimer: StartupTimer = { + stop: () => { + NativeModules.StartupTimer.stop(); + }, +}; + +export default startupTimer; diff --git a/src/libs/StartupTimer/index.ts b/src/libs/StartupTimer/index.ts new file mode 100644 index 000000000000..421524a70fc8 --- /dev/null +++ b/src/libs/StartupTimer/index.ts @@ -0,0 +1,11 @@ +/** + * Web noop as there is no "startup" to time from the native layer. + */ + +import StartupTimer from './types'; + +const startupTimer: StartupTimer = { + stop: () => {}, +}; + +export default startupTimer; diff --git a/src/libs/StartupTimer/types.ts b/src/libs/StartupTimer/types.ts new file mode 100644 index 000000000000..e382fc267933 --- /dev/null +++ b/src/libs/StartupTimer/types.ts @@ -0,0 +1,5 @@ +type StartupTimer = { + stop: () => void; +}; + +export default StartupTimer;