Closed dwelle closed 4 years ago
As you are de-DRY-ing, I also noticed the file names are DRY. The folder has the info we need, no need to repeat it in the file names again:
/src/legacy/file-open-legacy.mjs
→ /src/legacy/file-open.mjs
Do you want to take care of this in the PR, too?
Re: https://github.com/GoogleChromeLabs/browser-nativefs/pull/15/commits/1dc49c4ff10f72ccb3cddc6c13daa078f5f31910: The same applies for "nativefs" in the file names. Can you rename those, too?
Missed. Done.
Thanks :-) Getting there! While reviewing, I realized the isFile
method is no longer there, it's now a kind
attribute. Could you do a sanity check of the rest of the types, too?
Will do later today.
Will do later today.
Thanks a ton! 👏
I realized the
isFile
method is no longer there
It's still there for the OT, right? Either way, it's not shipped yet so do we want to update the interface yet? Anyway, I'll finish this tomorrow as I got held up in other work.
I realized the
isFile
method is no longer thereIt's still there for the OT, right? Either way, it's not shipped yet so do we want to update the interface yet? Anyway, I'll finish this tomorrow as I got held up in other work.
It's live as of Chrome 86. Not sure if there is a way to express that it can expose either the one, or the other API shape.
I went with using only the latest spec.
Unrelated: why does the library export a demo function imageToBlob
?
I went with using only the latest spec.
Thanks, this looks good.
Unrelated: why does the library export a demo function
imageToBlob
?
It's needed in the demo and may come in handy as a general convenience function more people would use.
may come in handy as a general convenience function more people would use.
That doesn't sound like too strong an argument, it's not even in the readme, and I'd not bloat the library by unrelated util helpers. Just my 2 cents :).
may come in handy as a general convenience function more people would use.
That doesn't sound like too strong an argument, it's not even in the readme, and I'd not bloat the library by unrelated util helpers. Just my 2 cents :).
That's fair. I'll move it to the demo folder and remove if from the lib in a separate PR.
As discussed, I DRYed out the docs by moving them to the type file, and referenced them in JSDoc for ease of use. I've also fixed some types that were supposed to be optional.
I'd say let's migrate to TS, but I have no experience in using TS with ESM packages.