-
Notifications
You must be signed in to change notification settings - Fork 302
Open
Description
According to the API docs for listObjectsV2 obj.name and obj.etag are string and obj.lastModified is Date. Based on BucketItem type in the code and the following observed error from tsc, it seems they can also be undefined or never:
error TS2345: Argument of type 'BucketItem' is not assignable to parameter of type '{ name: string; }'. Type '{ name?: undefined; etag?: undefined; lastModified?: undefined; prefix: string; size: 0; }' is not assignable to type '{ name: string; }'. Types of property 'name' are incompatible. Type 'undefined' is not assignable to type 'string'.
- Does this pose any risk during runtime?
- Is it safe to use the types like
BucketItemfromsrc/internal/type.ts? - Maybe the documentation could be updated to reflect something about this?
simonv3
Metadata
Metadata
Assignees
Labels
No labels