Type Alias: ReplaceType<T, ConditionType, ReplacementType>
ReplaceType<
T,ConditionType,ReplacementType> = [T] extends [ConditionType] ?ReplacementType:T
Defined in: src/sdk/utils/types/UtilityTypes.ts:99
Conditionally replaces a type with another one if the former extends 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 extend in order to be replaced. |
ReplacementType | The type with which to replace T if it extends ConditionType. |