import type { IExpression } from '../typings/expression'; import { Expression } from '../core/expression'; import { LineInfo } from '../misc/utils'; import { MichelsonType } from '../core/enums/type'; /** * Convert a value of type `TInt()` to `TOption(TNat())`. * * ```typescript * IsNat(Subtract(Nat(2), Nat(1))); // Some(Nat(1)) * ``` * * @category Integer * * @param expression A non-negative integer expression. * @param {LineInfo} line Source code line information (Used in error messages) * * @returns {IExpression} An expression that evaluates to TOption(TNat()). */ export declare const IsNat: (expression: IExpression, line?: LineInfo) => Expression; /** * Convert a value of type `TInt()` to `TNat()`. * * ```typescript * CastToNat(Subtract(Nat(2), Nat(1))); // Nat(1) * ``` * * @category Integer * * @param expression A non-negative integer expression. * @param errorMsg An optional value to be included in the error trace if the integer is negative. * @param {LineInfo} line Source code line information (Used in error messages) * * @returns {IExpression} An expression that evaluates to TNat(). */ export declare const CastToNat: (expression: IExpression, errorMsg?: IExpression, line?: LineInfo) => IExpression; /** * Convert a value of type `TNat()` to `TInt()` * * ```typescript * CastToInt(Nat(1)); // Int(1) * ``` * * @category Integer * * @param expression An expression that evaluates to a value of type `TInt()`. * @param {LineInfo} line Source code line information (Used in error messages) * * @returns {IExpression} An expression that evaluates to `TNat()`. */ export declare const CastToInt: (expression: IExpression, line?: LineInfo) => Expression; /** * Obtain the absolute value of an `TInt()` value. * * ```typescript * ABS(Int(-1)); // Nat(1) * ``` * * @category Integer * * @param expression An expression that evaluates to a value of type `TInt()`. * @param {LineInfo} line Source code line information (Used in error messages) * * @returns {IExpression} An expression that evaluates to `TNat()`. */ export declare const ABS: (expression: IExpression, line?: LineInfo) => Expression;