You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working on storacha/w3up#184 to add nb properties to store/list and upload/list to support pagination, got to this problem.
When we have nb with all optional properties like:
nb: {/** * Item where a previous list operation stopped, inclusive of the previous * result set. Use this value to start a new operation, inorder to paginate * list. */cursor: Schema.string().optional(),/** * Size of the page being requested to list. */size: Schema.integer().optional(),}
While working on storacha/w3up#184 to add
nb
properties tostore/list
andupload/list
to support pagination, got to this problem.When we have
nb
with all optional properties like:and we want to invoke like:
the interface types fail with
Property 'nb' is missing in type
. If we just add an empty object fornb
there types get happy.I looked through the types in https://github.com/web3-storage/ucanto/blob/5d04d169d09bd691261ddc86449488c05b093683/packages/interface/src/capability.ts#L178 but could not get to a solution to create PR. Main motivation here is to not require a breaking change to add new optional
nb
. However, it also makes sense in general to not need to provide empty object if everything is optionalThe text was updated successfully, but these errors were encountered: