Skip to content

Commit

Permalink
fix: types
Browse files Browse the repository at this point in the history
  • Loading branch information
hannojg committed Jun 7, 2022
1 parent f071775 commit 03ab4b3
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions types.d.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
declare module "react-native-performance-stats" {
import { EmitterSubscription } from "react-native";
import { EmitterSubscription } from "react-native";

type PerformanceStats = {
jsFps: number;
uiFps: number;
shutter?: number;
framesDropped?: number;
usedCpu: number;
usedRam: number;
}
export type PerformanceStatsData = {
jsFps: number;
uiFps: number;
shutter?: number;
framesDropped?: number;
usedCpu: number;
usedRam: number;
}

type PerformanceStatsModule = {
start: (withCPU?: boolean) => void;
stop: () => void;
addListener: (listener: (stats: PerformanceStats) => unknown) => EmitterSubscription;
}
type PerformanceStatsModule = {
start: (withCPU?: boolean) => void;
stop: () => void;
addListener: (listener: (stats: PerformanceStatsData) => unknown) => EmitterSubscription;
}

export = PerformanceStatsModule;
}
declare const PerformanceStats: PerformanceStatsModule;
export default PerformanceStats;

0 comments on commit 03ab4b3

Please sign in to comment.