ReplaceKey<T, K, R>: Omit<T, K> & Record<K, R>

Replace the type at a key in an object type.

Type Parameters

  • T extends object

    The object type to modify.

  • K extends keyof T

    The key to replace.

  • R

    The type to replace the key with.