Skip to content

Add FileSystemSyncAccessHandle #1471

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

Closed
SimonSiefke opened this issue Jan 12, 2023 · 5 comments
Closed

Add FileSystemSyncAccessHandle #1471

SimonSiefke opened this issue Jan 12, 2023 · 5 comments

Comments

@SimonSiefke
Copy link

The FileSystemFileHandle.prototype.createSyncAccessHandle method is used to create and object to synchronously read from and write to a file. It is only available in Web Workers.

MDN Link: https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileHandle/createSyncAccessHandle

caniuse

It is already supported by two or more browser engines (Chrome & Safari). Adding the FileSystemSyncAccessHandle api to lib.webworker.d.ts would be a great addition.

@saschanaz
Copy link
Contributor

Added by #1424 last year. Maybe update your TypeScript version?

@SimonSiefke
Copy link
Author

That's it. It is supported in TypeScript 5.0.0-beta. Thank you!

@namse
Copy link

namse commented Jun 1, 2024

Still got error Property 'createSyncAccessHandle' does not exist on type 'FileSystemFileHandle'.ts(2339) on typescript 5.4.5

@saschanaz
Copy link
Contributor

You need to make sure your worker script is using the right tsconfig; you need to specify "lib": ["webworker", ...]

@namse
Copy link

namse commented Jun 1, 2024

Problem solved. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants