Closed jmrog closed 3 years ago
Thanks for tackling this! <3
Quick feedback:
We need setupLegacyCleanupAndRejection
for all three pickers: save, open, directory.
The save picker likewise should have extensions
and mimeTypes
.
(I’m heading out for the weekend, I’ll be back on Monday.)
Thanks for tackling this!
<3
Quick feedback:We need
setupLegacyCleanupAndRejection
for all three pickers: save, open, directory.
I think you mean just for open and directory, right? The save operation at least currently does not use that method. I'm unsure whether this was an oversight or was done intentionally, maybe because the legacy save operation just triggers a download and then carries on?
In any case, I'll add it to the types for the directory open operation; they were missing in the previous iteration.
The save picker likewise should have
extensions
andmimeTypes
.
Oh, okay; it looks like mimeTypes
was missing from the earlier types for the save operation, in that case, but I can add it in.
As for extensions
, it's already included, via CoreFileOptions
. 👍
Okay, @tomayac, the latest update to the PR adds setupLegacyCleanupAndRejection
to the directory operation as well as the open operation. It also has extensions
and mimeTypes
for both save and open options objects. Finally, it enforces the requirement that only the first options object (when it is an array) specifies certain properties. Whether we want to do that last part is up to you, but it is a nice developer experience; I'm just now sure how far back you want to go with TypeScript version support.
Thanks a lot for tackling this. Part of the v0.20.2
release.
@tomayac This should do what you're looking for.