Type 'Struct<{ page: typeof NumberFromString; limit: typeof NumberFromString; }>' is not assignable to type 'Schema<Record<PropertyKey, unknown>, any, never>'. Types of property 'annotations' are incompatible. Type '(annotations: Schema<{ readonly page: number; readonly limit: number; }, readonly []>) => Struct<{ page: typeof NumberFromString; limit: typeof NumberFromString; }>' is not assignable to type '(annotations: Schema<Record<PropertyKey, unknown>, readonly []>) => Schema<Record<PropertyKey, unknown>, any, never>'. Types of parameters 'annotations' and 'annotations' are incompatible. Type 'Schema<Record<PropertyKey, unknown>, readonly []>' is not assignable to type 'Schema<{ readonly page: number; readonly limit: number; }, readonly []>' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties. The types returned by 'arbitrary(...)' are incompatible between these types. Type 'LazyArbitrary<Record<PropertyKey, unknown>>' is not assignable to type 'LazyArbitrary<{ readonly page: number; readonly limit: number; }>'. Type 'Record<PropertyKey, unknown>' is missing the following properties from type '{ readonly page: number; readonly limit: number; }': page, limit
Type 'Struct<{ page: typeof NumberFromString; limit: typeof NumberFromString; }>' is not assignable to type 'Schema<Record<PropertyKey, unknown>, any, never>'. Types of property 'annotations' are incompatible. Type '(annotations: Schema<{ readonly page: number; readonly limit: number; }, readonly []>) => Struct<{ page: typeof NumberFromString; limit: typeof NumberFromString; }>' is not assignable to type '(annotations: Schema<Record<PropertyKey, unknown>, readonly []>) => Schema<Record<PropertyKey, unknown>, any, never>'. Types of parameters 'annotations' and 'annotations' are incompatible. Type 'Schema<Record<PropertyKey, unknown>, readonly []>' is not assignable to type 'Schema<{ readonly page: number; readonly limit: number; }, readonly []>' with 'exactOptionalPropertyTypes: true'. Consider adding 'undefined' to the types of the target's properties. The types returned by 'arbitrary(...)' are incompatible between these types. Type 'LazyArbitrary<Record<PropertyKey, unknown>>' is not assignable to type 'LazyArbitrary<{ readonly page: number; readonly limit: number; }>'. Type 'Record<PropertyKey, unknown>' is missing the following properties from type '{ readonly page: number; readonly limit: number; }': page, limit
The goal here is quite simple - have a function work with only Struct schemas, like so: