Skip to content

Missing FileSystemDirectoryHandle methods in the lib.dom.d.ts #56360

@ghost

Description

🔎 Search Terms

typescript, visual-studio-code, intellisense, origin-private-system, FileSystemDirectoryHandle, lib.dom.d.ts

https://stackoverflow.com/questions/77453180/missing-filesystemdirectoryhandle-keys-method-in-vscode-intellisense

The nightly version and Playground do not display methods either.

🕗 Version & Regression Information

  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about FileSystemDirectoryHandle methods.

⏯ Playground Link

https://www.typescriptlang.org/play?ts=5.4.0-dev.20231110#code/BQQwzgngdgxgBMAlHAvAPjgbwFBz3GAeyjABc4AnQw0gEQEsLU4QB3Ee8qEAN3oHMQpQhQB0ZESH4BTUTLqNpMYRQhIA3LnwB6bXABihADZHCrelH5wAttNIALQgBMwN+mDAX+AGjgAjAFdyMACAB1CRUlcLG0IyfypWMGkKV2B7UlJQsAAuXSdpHmlTUJTRa0IAL3oTEFERfm1pKABaAFUAZW0nQhgwbQB1aT9tAEEABQBJbX0a6Q6IMmlrBgolFQgACRAoJyNpAGI-ROSKAH0ia1Chej8azghELTwqGlXRAGtpRY1nymoFGJmqQKPRpGBfvh-m9GKIeCAjAFwb8AL6IJBAA

💻 Code

    const rootDir = await navigator.storage.getDirectory();
    // Following methods missing, but supports in most browsers (https://developer.mozilla.org/en-US/docs/Web/API/FileSystemDirectoryHandle#browser_compatibility)
    rootDir.keys();
    rootDir.entries();
    rootDir.values();

🙁 Actual behavior

TypeScript write: Property 'keys' does not exist on type 'FileSystemDirectoryHandle'.(2339).

🙂 Expected behavior

That the TypeScript check recognizes the methods as valid.

Additional information about the issue

No response

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
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions