Skip to content

Commit

Permalink
Inline required DOM typings
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Jun 14, 2021
1 parent aa748d1 commit 806e5fa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/jest-fake-timers/src/legacyFakeTimers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ type Timer = {
};

type TimerAPI = {
cancelAnimationFrame: typeof window.cancelAnimationFrame | undefined;
cancelAnimationFrame: FakeTimersGlobal['cancelAnimationFrame'];
clearImmediate: typeof global.clearImmediate;
clearInterval: typeof global.clearInterval;
clearTimeout: typeof global.clearTimeout;
nextTick: typeof process.nextTick;

requestAnimationFrame: typeof window.requestAnimationFrame | undefined;
requestAnimationFrame: FakeTimersGlobal['requestAnimationFrame'];
setImmediate: typeof global.setImmediate;
setInterval: typeof global.setInterval;
setTimeout: typeof global.setTimeout;
Expand All @@ -49,8 +49,8 @@ type TimerConfig<Ref> = {
const MS_IN_A_YEAR = 31536000000;

interface FakeTimersGlobal extends NodeJS.Global {
cancelAnimationFrame?: typeof window.cancelAnimationFrame;
requestAnimationFrame?: typeof window.requestAnimationFrame;
cancelAnimationFrame?: (handle: number) => void;
requestAnimationFrame?: (callback: (time: number) => void) => number;
}

export default class FakeTimers<TimerRef> {
Expand Down

0 comments on commit 806e5fa

Please sign in to comment.