Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[No QA] [TS migration] Migrate 'StartupTimer' lib to TypeScript #26771

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions src/libs/StartupTimer/index.js

This file was deleted.

12 changes: 0 additions & 12 deletions src/libs/StartupTimer/index.native.js

This file was deleted.

13 changes: 13 additions & 0 deletions src/libs/StartupTimer/index.native.ts
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;
11 changes: 11 additions & 0 deletions src/libs/StartupTimer/index.ts
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;
5 changes: 5 additions & 0 deletions src/libs/StartupTimer/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type StartupTimer = {
stop: () => void;
};

export default StartupTimer;
Loading