Skip to content

Commit 02a3d35

Browse files
committed
fix: use typeof performance instead of Performance type for cross-platform compatibility
1 parent e7cc551 commit 02a3d35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/shared/utils/PerformanceMonitor.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ class PerformanceMonitorClass {
142142
}
143143
} else if (typeof performance !== 'undefined' && 'memory' in performance) {
144144
// Chrome 特有的 performance.memory API
145-
const perfWithMemory = performance as Performance & {
145+
const perfWithMemory = performance as typeof performance & {
146146
memory?: {
147147
usedJSHeapSize: number
148148
totalJSHeapSize: number

0 commit comments

Comments
 (0)