UNPKG

@convo-lang/convo-lang-cli

Version:
31 lines (30 loc) 1.29 kB
import { Conversation } from '@convo-lang/convo-lang'; import { CancelToken } from "@iyio/common"; import { ConvoCliConfig, ConvoCliOptions, ConvoExecAllowMode, ConvoExecConfirmCallback } from "./convo-cli-types"; export declare const getConvoCliConfigAsync: (options: ConvoCliOptions) => Promise<ConvoCliConfig>; export declare const initConvoCliAsync: (options: ConvoCliOptions) => Promise<ConvoCliOptions>; /** * Initializes the ConvoCli environment the returns a new ConvoCli object */ export declare const createConvoCliAsync: (options: ConvoCliOptions) => Promise<ConvoCli>; export declare class ConvoCli { readonly options: ConvoCliOptions; readonly buffer: string[]; readonly convo: Conversation; allowExec?: ConvoExecAllowMode | ConvoExecConfirmCallback; constructor(options: ConvoCliOptions); private _isDisposed; get isDisposed(): boolean; dispose(): void; private readonly dynamicFunctionCallback; runReplAsync(cancel?: CancelToken): Promise<void>; private outAsync; executeAsync(cancel?: CancelToken): Promise<void>; private readonly execConfirmAsync; private registerExec; private appendCodeAsync; private executeSourceCode; private convertCodeAsync; private parseCodeAsync; private writeOutputAsync; }