Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Arithmetic operations cannot be applied to a type definition that is conditional because the type is not known until runtime. Conditional types are determined based on some conditions that are evaluated at runtime, and the type may change dynamically depending on the outcome of the evaluation. Arithmetic operations require a fixed type or a type that can be explicitly inferred at compile time, which cannot be guaranteed with conditional types.

However, arithmetic operations can be applied to values of a conditional type once they are resolved at runtime. For example, if a function returns a conditional type, the return value can be assigned to a variable of the appropriate type, and arithmetic operations can then be applied to the value.