import { Compiler } from '../index.js'; import { CompilerBuffer } from '../buffer/index.js'; import type { ValidationField, SchemaLiteral } from '../../types.js'; /** * Exposes the API to compile the literal node to a set of inline * Javascript instructions. */ export declare class LiteralCompiler { private field; private node; private compiler; private references; disableOutVariable: boolean; forceValueDeclaration: boolean; /** * Name of the variable set for the literal node */ variableName: string; constructor(field: ValidationField, node: SchemaLiteral, compiler: Compiler, references: { outVariable: string; referenceVariable: string; parentPointer: ValidationField[]; }); /** * Initiate the variable name that hold the value of the current * field */ private initiateVariableName; /** * Writes the compiled statement to declare the value variable */ private declareValueVariable; private declareExistsVariable; /** * Writes the compiled statement for the mutation function. The mutate function is * passed to the validation definition. */ private declareMutationFunction; /** * Writes the compiled statement to declare the options that are passed to all * the validation functions for this field. */ private declareValidationOptions; /** * Writes the compiled statement to assign the out value. */ private assignOutValue; /** * Converts the literal node to compiled Javascript statement. */ compile(buffer: CompilerBuffer): void; }