import { Ast } from "@syuilo/aiscript/index.js"; import { TypeError } from "../index.js"; import { Scope } from "./Scope.js"; import { TypeValue } from "./TypeValue.js"; export declare class TypeChecker { globalScope: Scope; constructor(globalScope?: Scope); /** 型を文字の表現に戻す */ reprType(type: TypeValue, indent?: number): string; runBlock(statements: Ast.Node[], scope: Scope, errors: TypeError[]): TypeValue; /** インタープリターがASTを実行してゆくように、型チェックを行う */ run(node: Ast.Node, scope: Scope, errors: TypeError[]): TypeValue | null; runStmt(ast: Ast.Statement, scope: Scope, errors: TypeError[]): TypeValue | null; runExpr(ast: Ast.Expression, scope: Scope, errors: TypeError[]): TypeValue; /** `dest`に`value`が代入可能であるか */ isAssignableType(dest: TypeValue, value: TypeValue): boolean; /** 呼び出し可能な型なのかチェック */ isCallableType(type: TypeValue): boolean; /** 型の表現から、型を生成 */ inferFromTypeSource(ast: Ast.TypeSource, scope: Scope, errors: TypeError[]): TypeValue; preRunBlock(body: Ast.Node[], scope: Scope, errors: TypeError[]): void; preRun(node: Ast.Node, scope: Scope, errors: TypeError[]): void; }