Property ‘createSyncAccessHandle’ does not exist on type ‘FileSystemFileHandle’.ts(2339)
const root = await navigator.storage.getDirectory();
const File1 = await root.getFileHandle('file.txt', { create: true });
const accessHandle = await File1.createSyncAccessHandle();
Based on the docs we have createSyncAccessHandle
method but is not found, whether I am missing something
2
Answers
You used
createSyncAccessHandle()
inFileSystemDirectoryHandle
:getDirectoryHandle()
method butcreateSyncAccessHandle()
is inSo, i think you need to change to:
The docs state:
So my question is, are you runnning this inside a Web Worker?