import type { Nullable, ST_Expression, ST_Layout, ST_TypeDef } from 'SmartTS';
import { Node, TypeAliasDeclaration, TypeNode, NodeArray, InterfaceDeclaration, CallExpression } from 'typescript';
import { FrontendType } from '../../enums/type';
import { InterpreterBase } from './Base';
export default class TypeInterpreter extends InterpreterBase {
    visitInterfaceDeclaration: (node: InterfaceDeclaration) => void;
    visitTypeAliasDeclaration: (node: TypeAliasDeclaration) => void;
    /**
     * @description Extract type definition from type declaration.
     * @param {TypeNode} node
     * @returns {ST_TypeDef} Type definition
     */
    extractTypeDef: (node: TypeNode) => ST_TypeDef;
    /**
     * @description Check property type against the initializer.
     * @param {Node} node
     * @returns {ST_TypeDef} Type definition
     */
    checkType: (node: Node) => ST_TypeDef;
    private getTypesFromArray;
    private composeFrontendType;
    extractCallReturnType: (baseType: FrontendType, args: NodeArray<Node>) => Nullable<ST_TypeDef>;
    /**
     * @description Get type from access expression
     * @param {string[]} namespace type reference
     * @returns {ST_TypeDef} Type Definition
     */
    dereferenceType: (namespace: string[]) => ST_TypeDef;
    /**
     * @description Get type from access expression
     * @param {string[]} namespace property reference
     * @returns {ST_TypeDef} Type Definition
     */
    dereferencePropertyType: (namespace: string[]) => ST_TypeDef;
    dereferenceTypeOfNativeValue: (namespace: string[]) => ST_TypeDef;
    dereferenceTypeOfNativeMethod: (namespace: string[]) => FrontendType;
    extractLayout: (node: Node) => ST_Layout | Layout;
    resolveTypeOfAccessExpression: (expr: ST_Expression) => ST_TypeDef;
    validateNativeMethodArgs: (methodArgs: (ST_TypeDef & {
        optional: boolean;
    })[], expr: CallExpression) => void;
}
