properties < const P , const O > ( props , oprops , additional ) : CompiledSchema < { - readonly [ K in keyof ( Required < P > & Partial < O > & Record < string , unknown > ) ] : ( P & O ) [ K ] extends CompiledSchema < infer T , unknown > ? T : unknown } , { additionalProperties : true ; optionalProperties : { - readonly [ K in keyof O ] : O [ K ] extends CompiledSchema < unknown , infer S > ? S : never } ; properties : { - readonly [ K in keyof P ] : P [ K ] extends CompiledSchema < unknown , infer S > ? S : never } ; } > Type Parameters const P extends Readonly < Record < string , CompiledSchema < unknown , unknown > > > const O extends Readonly < Record < string , CompiledSchema < unknown , unknown > > > Parameters props : P oprops : O additional : true Returns CompiledSchema < { - readonly [ K in keyof ( Required < P > & Partial < O > & Record < string , unknown > ) ] : ( P & O ) [ K ] extends CompiledSchema < infer T , unknown > ? T : unknown } , { additionalProperties : true ; optionalProperties : { - readonly [ K in keyof O ] : O [ K ] extends CompiledSchema < unknown , infer S > ? S : never } ; properties : { - readonly [ K in keyof P ] : P [ K ] extends CompiledSchema < unknown , infer S > ? S : never } ; } > properties < const P > ( props , oprops , additional ) : CompiledSchema < { - readonly [ K in keyof ( Required < P > & Record < string , unknown > ) ] : P [ K ] extends CompiledSchema < infer T , unknown > ? T : unknown } , { additionalProperties : true ; properties : { - readonly [ K in keyof P ] : P [ K ] extends CompiledSchema < unknown , infer S > ? S : never } ; } > Type Parameters const P extends Readonly < Record < string , CompiledSchema < unknown , unknown > > > Parameters props : P oprops : undefined additional : true Returns CompiledSchema < { - readonly [ K in keyof ( Required < P > & Record < string , unknown > ) ] : P [ K ] extends CompiledSchema < infer T , unknown > ? T : unknown } , { additionalProperties : true ; properties : { - readonly [ K in keyof P ] : P [ K ] extends CompiledSchema < unknown , infer S > ? S : never } ; } > properties < const O > ( props , oprops , additional ) : CompiledSchema < { - readonly [ K in keyof ( Partial < O > & Record < string , unknown > ) ] : O [ K ] extends CompiledSchema < infer T , unknown > ? T : unknown } , { additionalProperties : true ; optionalProperties : { - readonly [ K in keyof O ] : O [ K ] extends CompiledSchema < unknown , infer S > ? S : never } ; } > Type Parameters const O extends Readonly < Record < string , CompiledSchema < unknown , unknown > > > Parameters props : undefined oprops : O additional : true Returns CompiledSchema < { - readonly [ K in keyof ( Partial < O > & Record < string , unknown > ) ] : O [ K ] extends CompiledSchema < infer T , unknown > ? T : unknown } , { additionalProperties : true ; optionalProperties : { - readonly [ K in keyof O ] : O [ K ] extends CompiledSchema < unknown , infer S > ? S : never } ; } > properties < const P , const O > ( props , oprops , additional ? ) : CompiledSchema < { - readonly [ K in keyof ( Required < P > & Partial < O > ) ] : ( P & O ) [ K ] extends CompiledSchema < infer T , unknown > ? T : never } , { optionalProperties : { - readonly [ K in keyof O ] : O [ K ] extends CompiledSchema < unknown , infer S > ? S : never } ; properties : { - readonly [ K in keyof P ] : P [ K ] extends CompiledSchema < unknown , infer S > ? S : never } ; } > Type Parameters const P extends Readonly < Record < string , CompiledSchema < unknown , unknown > > > const O extends Readonly < Record < string , CompiledSchema < unknown , unknown > > > Parameters props : P oprops : O Optional
additional : false Returns CompiledSchema < { - readonly [ K in keyof ( Required < P > & Partial < O > ) ] : ( P & O ) [ K ] extends CompiledSchema < infer T , unknown > ? T : never } , { optionalProperties : { - readonly [ K in keyof O ] : O [ K ] extends CompiledSchema < unknown , infer S > ? S : never } ; properties : { - readonly [ K in keyof P ] : P [ K ] extends CompiledSchema < unknown , infer S > ? S : never } ; } > properties < const P > ( props , oprops ? , additional ? ) : CompiledSchema < { - readonly [ K in keyof Required < P > ] : P [ K ] extends CompiledSchema < infer T , unknown > ? T : never } , { properties : { - readonly [ K in keyof P ] : P [ K ] extends CompiledSchema < unknown , infer S > ? S : never } ; } > Type Parameters const P extends Readonly < Record < string , CompiledSchema < unknown , unknown > > > Parameters props : P Optional
oprops : undefined Optional
additional : false Returns CompiledSchema < { - readonly [ K in keyof Required < P > ] : P [ K ] extends CompiledSchema < infer T , unknown > ? T : never } , { properties : { - readonly [ K in keyof P ] : P [ K ] extends CompiledSchema < unknown , infer S > ? S : never } ; } > properties < const O > ( props , oprops , additional ? ) : CompiledSchema < { - readonly [ K in keyof Partial < O > ] : O [ K ] extends CompiledSchema < infer T , unknown > ? T : never } , { optionalProperties : { - readonly [ K in keyof O ] : O [ K ] extends CompiledSchema < unknown , infer S > ? S : never } ; } > Type Parameters const O extends Readonly < Record < string , CompiledSchema < unknown , unknown > > > Parameters props : undefined oprops : O Optional
additional : false Returns CompiledSchema < { - readonly [ K in keyof Partial < O > ] : O [ K ] extends CompiledSchema < infer T , unknown > ? T : never } , { optionalProperties : { - readonly [ K in keyof O ] : O [ K ] extends CompiledSchema < unknown , infer S > ? S : never } ; } >
a schema that accepts named and optional properties as well as properties not listed
This function has many overloads to account for the different ways to specify optional and non-optional properties, However, effectively either
props
oroprops
must be specified, and additional is a boolean value.