tempus
Version:
one rAF to rule them all
14 lines (12 loc) • 419 B
TypeScript
type ProfilerCorner = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
type ProfilerOptions = {
fps?: number;
corner?: ProfilerCorner;
container?: HTMLElement;
};
type ProfilerHandle = {
element: HTMLElement;
destroy: () => void;
};
declare function profiler(options?: ProfilerOptions): ProfilerHandle;
export { type ProfilerCorner, type ProfilerHandle, type ProfilerOptions, profiler };