I need to create a blob to test a file upload function. I'd like to annotate it in vscode but I keep getting the following error: Type 'Blob' is missing the following properties from type '{ lastModifiedDate: Date; name: string; }': lastModifiedDate, name ts(2739)
This is what I have so far:
/** @type {{lastModifiedDate: Date, name:string}} */
const blob = new Blob([range(1024)], { type: 'image/png' });
blob.lastModifiedDate = new Date();
blob.name = name;
It works in that it shows be the type declarations but it still throws the error.
Any suggestions?