arktypea
arktype10mo ago
Micha

How to create an arktype generic from a generic class<>?

My expectation:

const page = type.instanceOf(Page);
const pageWithType = page(type("string"))


but page is already a final type after instance of: const page: Type<Page<QueryValue>, {}>

Page:
(alias) class Page<T extends QueryValue>
import Page
A materialized view of a Set.

@see — https://docs.fauna.com/fauna/current/reference/fql_reference/types#set


https://arktype.io/docs/generics
Optimized runtime validation for TypeScript syntax
Was this page helpful?