10000 window.requestIdleCallback type missing · Issue #40807 · microsoft/TypeScript · GitHub
[go: up one dir, main page]

Skip to content
window.requestIdleCallback type missing #40807
Closed
@nstepien

Description

@nstepien

TypeScript Version: 4.1.0-dev.20200925

Search Terms: requestIdleCallback

Code

requestIdleCallback(() => {})

Expected behavior:
requestIdleCallback is typed.

Actual behavior:

Cannot find name 'requestIdleCallback'. ts(2304)

Playground Link:
https://www.typescriptlang.org/play?#code/E4UwjgriDOAuCSATANiAwgQ2cgRhgxgNYAUxAlAAQC8AfBQN4C+ZQA

Related Issues:
#21309
The previous issue was labelled as "working as intended" over 2 years ago, but I don't think the API is experimental anymore. It is available in Chrome/Firefox/Edgium, and Safari (behind a flag).
https://www.w3.org/TR/requestidlecallback/
https://w3c.github.io/requestidlecallback/
https://caniuse.com/requestidlecallback
https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0