mirror of
https://github.com/facebook/react-native.git
synced 2026-11-18 20:19:07 +00:00
Fix toJSON return types in bom.js.flow (#56623)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/56623 Fix the return types of toJSON() methods in PerformanceEntry, PerformanceServerTiming, and Performance to return an object representation ({[string]: unknown}) instead of a string, per the WebIDL spec ([Default] object toJSON()). Changelog: [internal] Reviewed By: fabriziocucci Differential Revision: D102597516 fbshipit-source-id: 9f063d16693e1b44f89a298c08f25548f8a05c76
This commit is contained in:
1 parent
8fc503d780
commit
ce696dfe2d
1 file changed
+3
-3
@@ -108,7 +108,7 @@ declare class PerformanceEntry {
|
||||
entryType: string;
|
||||
name: string;
|
||||
startTime: DOMHighResTimeStamp;
|
||||
toJSON(): string;
|
||||
toJSON(): {[string]: unknown};
|
||||
}
|
||||
|
||||
// https://w3c.github.io/user-timing/#performancemark
|
||||
@@ -127,7 +127,7 @@ declare class PerformanceServerTiming {
|
||||
description: string;
|
||||
duration: DOMHighResTimeStamp;
|
||||
name: string;
|
||||
toJSON(): string;
|
||||
toJSON(): {[string]: unknown};
|
||||
}
|
||||
|
||||
// https://www.w3.org/TR/resource-timing-2/#sec-performanceresourcetiming
|
||||
@@ -224,7 +224,7 @@ declare class Performance {
|
||||
endMark?: string,
|
||||
): PerformanceMeasure;
|
||||
now(): DOMHighResTimeStamp;
|
||||
toJSON(): string;
|
||||
toJSON(): {[string]: unknown};
|
||||
}
|
||||
|
||||
declare var performance: Performance;
|
||||
|
||||
Reference in new issue
Block a user