Incorrect type for `FileWithPath`'s `path` and `relativePath` properties
The FileWithPath interface defines both its path and relativePath properties as optional:
https://github.com/react-dropzone/file-selector/blob/f159a4a034b942054ad18453fffa77fce7a6dc87/src/file.ts#L1233-L1237
indicating they could be undefined.
Looking at the implementation of toFileWithPath, however, it looks like there's no code path where either could be undefined. In particular, if file.path isn't already a string, it's set to a variable which is definitely a string by that point. relativePath is unconditionally set to the same variable mentioned above that's definitely a string.
This seems like a bug with the definition of FileWithPath: if neither path nor relativePath can ever be undefined, then marking them as optional isn't accurate.
I came across this as I was trying to figure out which situations could cause path or relativePath to be undefined so I could account for those situations in my web app.