-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26771 from software-mansion-labs/ts-migration/sta…
…rtup-timer-lib [No QA] [TS migration] Migrate 'StartupTimer' lib to TypeScript
- Loading branch information
Showing
5 changed files
with
29 additions
and
19 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
type StartupTimer = { | ||
stop: () => void; | ||
}; | ||
|
||
export default StartupTimer; |