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

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

Closed
pascalav opened this issue Nov 10, 2023 · 2 comments · Fixed by #56723
Closed

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

pascalav opened this issue Nov 10, 2023 · 2 comments · Fixed by #56723
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Help Wanted You can do this
Milestone

Comments

@pascalav
Copy link

🔎 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

@RyanCavanaugh RyanCavanaugh added Help Wanted You can do this Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Bug A bug in TypeScript labels Nov 10, 2023
@RyanCavanaugh RyanCavanaugh added this to the Backlog milestone Nov 10, 2023
@jakebailey
Copy link
Member

I'm pretty sure that this is something that has to be fixed in https://github.com/microsoft/TypeScript-DOM-lib-generator; I had thought that the problem here was that they weren't including DOM.Iterable, but I don't see this type mentioned there.

@MulverineX
Copy link

Related issues: microsoft/TypeScript-DOM-lib-generator#1639 #29867

Looks like the typings are being generated 🤔 https://github.com/microsoft/TypeScript-DOM-lib-generator/blob/main/baselines/dom.asynciterable.generated.d.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Help Wanted You can do this
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants