Type Alias: ReplaceExactType<T, ConditionType, ReplacementType>
ReplaceExactType<
T,ConditionType,ReplacementType> = [T] extends [ConditionType] ? [ConditionType] extends [T] ?ReplacementType:T:T
Defined in: src/sdk/utils/types/UtilityTypes.ts:108
Conditionally replaces a type with another one if the former equals a specified type. The type to replace is not distributed if it is a union.
Type Parameters
| Type Parameter | Description |
|---|---|
T | The type to replace. |
ConditionType | The type that T must be equal to in order to be replaced. |
ReplacementType | The type with which to replace T if it equals ConditionType. |