import { Type } from '../'; import { Expression } from '../../expressions'; import { ConstraintConfig } from '../../functions'; import { IntegralExpression } from './integral'; import { NumberExpression } from './number'; export * from './integral'; export * from './number'; export declare const SMALLINT: () => SmallintType; export declare const SMALLSERIAL: () => SmallintType; export declare type SmallintArg = SmallintType['argument']; export interface SmallintType extends Type<'SMALLINT', R> { expression: IntegralExpression>; argument: Expression | this['input']; required(conf?: ConstraintConfig): SmallintType; } export declare const INTEGER: () => IntegerType; export declare const SERIAL: () => IntegerType; export declare type IntegerArg = IntegerType['argument']; export interface IntegerType extends Type<'INTEGER', R> { expression: IntegralExpression>; argument: Expression | this['input'] | Expression; required(conf?: ConstraintConfig): IntegerType; } export declare const BIGINT: () => BigintType; export declare const BIGSERIAL: () => BigintType; export declare type BigintArg = BigintType['argument']; export interface BigintType extends Type<'BIGINT', R> { expression: IntegralExpression>; argument: Expression | this['input'] | Expression | Expression; required(conf?: ConstraintConfig): BigintType; } export declare const NUMERIC: () => NumericType; export declare type NumericArg = NumericType['argument']; export interface NumericType extends Type<'NUMERIC', R> { expression: NumberExpression>; argument: Expression | this['input'] | Expression | Expression | Expression; required(conf?: ConstraintConfig): NumericType; } export declare const REAL: () => RealType; export declare type RealArg = RealType['argument']; export interface RealType extends Type<'REAL', R> { expression: NumberExpression>; argument: Expression | this['input'] | Expression | Expression | Expression | Expression; required(conf?: ConstraintConfig): RealType; } export declare const DOUBLE: () => DoubleType; export declare type DoubleArg = DoubleType['argument']; export interface DoubleType extends Type<'DOUBLE', R> { expression: NumberExpression>; argument: Expression | this['input'] | Expression | Expression | Expression | Expression | Expression; required(conf?: ConstraintConfig): DoubleType; } export declare type MathTypesPrec = [SmallintType, IntegerType, BigintType, NumericType, RealType, DoubleType]; export declare type InferMathTypePrec> = T extends [...infer R, infer L] ? L extends X ? X : L extends Y ? Y : InferMathTypePrec : never; export declare type ToMathExpression = T extends MathExpression ? T : Expression; export declare type MathType = SmallintType | IntegerType | BigintType | NumericType | RealType | DoubleType; export declare type MathExpression = MathType['expression']; export declare type MathLiteral = MathType['input']; export declare type MathArg = MathType['argument']; export declare type IntegralType = SmallintType | IntegerType | BigintType; export declare type IntegralLiteral = IntegralType['input']; export declare type IntegralArg = IntegralType['argument'];