import type { StandardSchemaV1 } from "./standard-schema.ts"; type InferInputObj> = { [K in keyof T]: StandardSchemaV1.InferInput; }; type InferOutputObj> = { [K in keyof T]: StandardSchemaV1.InferOutput; }; type SchemaClassCtor> = { new (input: InferInputObj): InferOutputObj & { _shape: T }; _shape: T; }; export function SchemaClass>( shape: T, ): SchemaClassCtor { const GeneratedSchemaClass = class { static _shape: T = shape; declare _shape: T; constructor(input: InferInputObj) { Object.assign(this, input); this._shape = shape; } }; return GeneratedSchemaClass as SchemaClassCtor; }