Skip to content

Int

Int implements ref.Val as well as comparison and math operators.

new Int(value): Int

number | bigint

Int

add(other): Val

Add returns a combination of the current value and other value.

Val

Val

Adder.add


compare(other): Val

Compare this value to the input other value.

Val

Val

Comparer.compare


convertToNative(typeDesc?): unknown

ConvertToNative converts the Value to a native TypeScript value according to the provided type description, or throws if the conversion is not feasible.

unknown

unknown

Val.convertToNative


convertToType(typeValue): Val

ConvertToType supports type conversions between CEL value types supported by the expression language.

RefType

Val

Val.convertToType


divide(other): Val

Divide returns the result of dividing the current value by the input denominator.

Val

Val

Divider.divide


equal(other): Val

Equal returns true if the other value has the same type and content as the implementing value.

Val

Val

Val.equal


isZeroValue(): boolean

IsZeroValue returns true if integer is equal to 0.

boolean


modulo(other): Val

Modulo returns the result of taking the modulus of the current value by the denominator.

Val

Val

Modder.modulo


multiply(other): Val

Multiply returns the result of multiplying the current and input value.

Val

Val

Multiplier.multiply


negate(): Val

Negate returns the complement of the current value.

Val

Negater.negate


subtract(other): Val

Subtract returns the result of subtracting the input from the current value.

Val

Val

Subtractor.subtract


type(): RefType

Type returns the TypeValue of the value.

RefType

Val.type


value(): bigint

Value returns the raw value of the instance which may not be directly compatible with the expression language types.

bigint

Val.value