| 268 | * @since 4.0.0 |
| 269 | */ |
| 270 | export interface Class< |
| 271 | Self, |
| 272 | Fields extends Struct.Fields, |
| 273 | S extends Schema.Top & { |
| 274 | readonly fields: Schema.Struct.Fields |
| 275 | } |
| 276 | > extends Schema.Class<Self, S, {}>, Struct<Struct_.Simplify<Fields>> { |
| 277 | readonly "Type": Self |
| 278 | readonly "Encoded": S["Encoded"] |
| 279 | readonly "DecodingServices": S["DecodingServices"] |
| 280 | readonly "EncodingServices": S["EncodingServices"] |
| 281 | readonly "~type.make.in": S["~type.make.in"] |
| 282 | readonly "~type.make": Self |
| 283 | readonly "Iso": S["Iso"] |
| 284 | |
| 285 | new( |
| 286 | props: S["~type.make.in"], |
| 287 | options?: { |
| 288 | readonly disableChecks?: boolean |
| 289 | } | undefined |
| 290 | ): S["Type"] |
| 291 | |
| 292 | make<Args extends Array<any>, X>( |
| 293 | this: { new(...args: Args): X }, |
| 294 | ...args: Args |
| 295 | ): X |
| 296 | |
| 297 | readonly fields: S["fields"] |
| 298 | } |
| 299 | |
| 300 | type MissingSelfGeneric<Params extends string = ""> = |
| 301 | `Missing \`Self\` generic - use \`class Self extends Class<Self>()(${Params}{ ... })\`` |