@battle-racing/br-common-lib
Version:
Common library for all Battle Racing Repositorios
18 lines (12 loc) • 630 B
text/typescript
export type ArithmeticOperator = '+' | '-' | '*' | '/';
/**
* The Value is determined by an arithmetic operator followed by a number.
*/
export type SimpleArithmeticString = `${ArithmeticOperator}${number}`;
export type KartContextVariable = '$kart.configuredSpeed' | '$kart.powerUpTime';
export type ContextVariable = KartContextVariable;
export type ContextArithmeticString =
// Example: $kart.configuredSpeed + 1
`${ContextVariable} ${ArithmeticOperator} ${number}`;
// Unión de todos los posibles formatos de expresión
export type ArithmeticExpression = number | SimpleArithmeticString | ContextArithmeticString;