-
Notifications
You must be signed in to change notification settings - Fork 326
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing include
property from R2ListOptions
#1522
Comments
include
property from R2ObjectListOptions
include
property from R2ListOptions
The You need to be on (at least) the 2022-08-04 types for the Replace |
Ah I shouldve known that would have an impact. Thanks!
Jesse Greer
… On Jan 8, 2024, at 8:37 PM, Kian ***@***.***> wrote:
The @cloudflare/workers-types package has several folders which contain the correct types for different compatibility dates. If you don't specify one of those, you will default to the oldest types.
You need to be on (at least) the 2022-08-04 types for the include property, since it wasn't respected up until that compatibility date when it was fixed via the r2_list_honor_include <https://developers.cloudflare.com/workers/configuration/compatibility-dates/#r2-bucket-list-respects-the-include-option> flag.
Replace @cloudflare/workers-types in tsconfig.json with the appropriate set, i.e @cloudflare/workers-types/2023-07-01 if your compatibility date is on or after 2023-07-01.
—
Reply to this email directly, view it on GitHub <#1522 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/APM3ZKPZKRHSOCUMP4AXP7TYNSNPPAVCNFSM6AAAAABBSFYW5WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBSGEZTEOJWHA>.
You are receiving this because you authored the thread.
|
Looks like this has been resolved. We're working on a new types generation system that should make these kind of issues harder to come by. 👍 |
Per the API Reference:
R2ListOptions
has aninclude
property that acceptshttpMetadata
and/orcustomMetadata
. If included, items returned by the list will include the specified metadata.This property is not included in the typescript definitions:
The text was updated successfully, but these errors were encountered: