mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
API symmetry when passing PerformanceEntryType to/from native module
Summary: [Changelog][Internal] `NativePerformanceObserver` TurboModule API would get the type for performance entries as strings in one direction (`start/stopReporting`) and as integers in another direction (inside `RawPerformanceEntry`, for optimization on the native side). This makes is symmetrical and consistent, all the conversions are now handled on the JS side. Reviewed By: christophpurrer Differential Revision: D43236466 fbshipit-source-id: 08e1b62df90e6d26a11577d6b6b1d91a6bce8339
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e168db4c3b
commit
aef7194996
@@ -38,8 +38,8 @@ export type GetPendingEntriesResult = {|
|
||||
|};
|
||||
|
||||
export interface Spec extends TurboModule {
|
||||
+startReporting: (entryType: string) => void;
|
||||
+stopReporting: (entryType: string) => void;
|
||||
+startReporting: (entryType: RawPerformanceEntryType) => void;
|
||||
+stopReporting: (entryType: RawPerformanceEntryType) => void;
|
||||
+popPendingEntries: () => GetPendingEntriesResult;
|
||||
+setOnPerformanceEntryCallback: (callback?: () => void) => void;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user