Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

window.requestIdleCallback #21309

Closed
mjbvz opened this issue Jan 19, 2018 · 5 comments
Closed

window.requestIdleCallback #21309

mjbvz opened this issue Jan 19, 2018 · 5 comments
Labels
Working as Intended The behavior described is the intended behavior; this is not a bug

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Jan 19, 2018

From @bsvipas on January 19, 2018 7:0

  • VSCode Version: 1.19.2
  • OS Version: macOS

There's no suggestion for window.requestIdleCallback (rIC) only for window.requestAnimationFrame (rAF).

Copied from original issue: microsoft/vscode#41850

@mjbvz mjbvz self-assigned this Jan 19, 2018
@mjbvz mjbvz removed their assignment Jan 19, 2018
@mjbvz mjbvz added the VS Code Tracked There is a VS Code equivalent to this issue label Jan 19, 2018
@RyanCavanaugh RyanCavanaugh added the Working as Intended The behavior described is the intended behavior; this is not a bug label Jan 19, 2018
@RyanCavanaugh
Copy link
Member

We don't include experimental APIs in lib.d.ts

@ghost
Copy link

ghost commented Jan 22, 2018

@RyanCavanaugh 😢

@mhegazy mhegazy removed the VS Code Tracked There is a VS Code equivalent to this issue label Jan 24, 2018
@thasmo
Copy link

thasmo commented Feb 6, 2018

Too bad.

@typescript-bot
Copy link
Collaborator

Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.

@sorin-davidoi
Copy link

Posting this here for people who want to copy/paste into their projects:

type RequestIdleCallbackHandle = any;
type RequestIdleCallbackOptions = {
  timeout: number;
};
type RequestIdleCallbackDeadline = {
  readonly didTimeout: boolean;
  timeRemaining: (() => number);
};

declare global {
  interface Window {
    requestIdleCallback: ((
      callback: ((deadline: RequestIdleCallbackDeadline) => void),
      opts?: RequestIdleCallbackOptions,
    ) => RequestIdleCallbackHandle);
    cancelIdleCallback: ((handle: RequestIdleCallbackHandle) => void);
  }
}

@microsoft microsoft locked and limited conversation to collaborators Jul 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Working as Intended The behavior described is the intended behavior; this is not a bug
Projects
None yet
Development

No branches or pull requests

6 participants