spread and generics
I'm wanting to define a generic, then another generic wrapping and passing through the generic
4 Replies
Seems like the scoped approach for generics would allow what you're looking for here?
https://arktype.io/docs/generics#scoped
Are there some more examples on scoped? I'm looking to build a bunch of models from the api, then wrap them in these response types when I call them, so
which works fine. Obv use
apiPaginatedResponse
for paginated data.
Is this the right utility?
This seems to work...
I'm not sure how
.infer
works on a generic like that for you the property shouldn't be availablecuz I'm grabbing the
ReturnType
maybe?
but everything looks alright