import { Program } from './types';
/**
 * Represents a type checking error or warning
 */
export interface TypeCheckError {
    message: string;
    line: number;
    column: number;
    code: string;
    snippet: string;
    severity: 'error' | 'warning';
}
/**
 * Stable error codes for type checking diagnostics
 */
export declare const TypeCheckErrorCode: {
    readonly TypeMismatch: "TYPE_NOT_ASSIGNABLE";
    readonly ClassNotFound: "CLASS_NOT_FOUND";
    readonly InvalidExtends: "INVALID_EXTENDS";
    readonly CircularInheritance: "CIRCULAR_INHERITANCE";
};
export type TypeCheckErrorCode = (typeof TypeCheckErrorCode)[keyof typeof TypeCheckErrorCode];
/**
 * Result of type checking operation
 */
export interface TypeCheckResult {
    errors: TypeCheckError[];
    warnings: TypeCheckError[];
}
/**
 * Represents a type in the SomonScript type system
 */
export interface Type {
    kind: string;
    name?: string;
    value?: string | number | boolean | null;
    elementType?: Type;
    types?: Type[];
    properties?: Map<string, PropertyType>;
    returnType?: Type;
    baseType?: Type;
    typeParameters?: Type[];
}
/**
 * Represents a property type with optional flag
 */
export interface PropertyType {
    type: Type;
    optional: boolean;
}
/**
 * Type checker for SomonScript AST
 * Provides comprehensive type checking with Tajik Cyrillic type annotations
 */
export declare class TypeChecker {
    private errors;
    private warnings;
    private symbolTable;
    private interfaceTable;
    private typeAliasTable;
    private sourceLines;
    constructor(source?: string);
    /**
     * Initialize primitive types in the symbol table
     */
    private initializePrimitiveTypes;
    private getSnippet;
    /**
     * Perform type checking on the entire program
     * @param program - The AST program to type check
     * @returns Type checking result with errors and warnings
     */
    check(program: Program): TypeCheckResult;
    /**
     * Get the symbol table for language server completions
     * @returns The symbol table with all defined types
     */
    getSymbolTable(): Map<string, Type>;
    private collectTypeDefinitions;
    private collectInterface;
    private collectTypeAlias;
    private collectClass;
    private checkStatement;
    private checkVariableDeclaration;
    private bindPatternTypes;
    private bindArrayPatternTypes;
    private bindObjectPatternTypes;
    private checkFunctionDeclaration;
    private checkClassDeclaration;
    private validateSuperClass;
    private addInvalidExtendsError;
    private validateClassPropertyTypes;
    private validatePropertyDefinition;
    /**
     * Check for circular inheritance in class hierarchy
     * Follows fail-fast principle: errors are reported immediately
     */
    private checkCircularInheritance;
    private resolveTypeNode;
    private resolvePrimitiveType;
    private resolveLiteralType;
    private resolveArrayType;
    private resolveUnionType;
    private resolveIntersectionType;
    private resolveTupleType;
    private resolveGenericType;
    private resolveUniqueType;
    private resolveIdentifierType;
    private resolveNamedType;
    private mapTajikToPrimitive;
    private inferExpressionType;
    private inferLiteralType;
    private inferIdentifierType;
    private inferTupleTypeFromTarget;
    private inferArrayElementType;
    private inferArrayExpressionType;
    /**
     * Get the base type of a type, converting literals to their base primitives
     * E.g., { kind: 'literal', value: 5 } -> { kind: 'primitive', name: 'number' }
     */
    private getBaseType;
    private inferObjectType;
    private extractObjectProperties;
    private inferCallType;
    private inferNewExpressionType;
    private isLiteralAssignableToPrimitive;
    private isStandardTypeAssignable;
    private isStructuralTypeAssignable;
    private isSpecialCaseAssignable;
    private isAssignable;
    private isExactMatch;
    private isArrayAssignable;
    private isTupleAssignable;
    private isArrayToTupleAssignable;
    private isUnionAssignable;
    private isIntersectionAssignable;
    private isInterfaceAssignable;
    private isObjectAssignable;
    private isClassAssignable;
    private isUniqueAssignable;
    private typeToString;
    private isStructurallyCompatible;
    private mapPrimitiveToTajik;
    private addError;
    private addWarning;
}
//# sourceMappingURL=type-checker.d.ts.map