Intersection that replaces the type of some keys in given object type.
Intersection type to replace all the given keys of an object type with a new type.
type User = { name: string; age: number };type ReallyOldUser = ReplaceType<User, "age", bigint>; Copy
type User = { name: string; age: number };type ReallyOldUser = ReplaceType<User, "age", bigint>;
Type to replace the type of some keys in.
Keys to replace the type of.
New type to replace the old type with.
Intersection that replaces the type of some keys in given object type.
Remarks
Intersection type to replace all the given keys of an object type with a new type.
Example
See