const opts = {
suggestedName: 'data',
types: [
{
description: 'NewCSV',
accept: { 'text/csv': ['.csv'] },
},
],
};
const handle = await (window).showSaveFilePicker(opts);
now I have the type error Property 'showSaveFilePicker' does not exist on type 'Window & typeof globalThis', providing type as any solves the issue of type error.
const handle = await (<any>window).showSaveFilePicker(opts);
But still it will show the eslint error Unsafe call of an any
typed value. So the only solution I know is to disable eslint for the file. Is there any other way to avoid both the type error and eslint error ?