export type State = { definitionsAtLastRun: string; interactionsSinceLastRun: string[]; editorContents: string; replContents: string; messageNumber?: number; }; export type API = { sendReset: (state: State) => void; currentState: () => State; postMessage: (message: any) => void; getFrame: () => HTMLIFrameElement; setInteractions: (text: string) => void; runDefinitions: () => void; runInteractionResult: () => Promise; onChange: (callback: (msg: any) => void) => void; clearInteractions: () => void; }; export type ReadFileOpts = { encoding?: string; } | "utf8"; export type RPCFunctions = { fs?: { writeFile?: (p: string, buffer: Buffer) => Promise; readFile?: (p: string, opts: ReadFileOpts) => Promise; stat?: (p: string) => Promise<{ mtime: number; ctime: number; size: number; native: any; }>; createDir?: (p: string) => Promise; }; path?: { join?: (...paths: string[]) => string; resolve?: (p: string) => string; basename?: (p: string) => string; dirname?: (p: string) => string; extname?: (p: string) => string; relative?: (from: string, to: string) => string; "is-absolute"?: (p: string) => boolean; }; process?: { cwd?: () => string; }; }; export type EmbedConfig = { container: HTMLElement; src?: string; id?: string; state?: State; rpc?: RPCFunctions; options: { footerStyle?: "hide" | "normal"; warnOnExit?: boolean; hideDefinitions?: boolean; hideInteractions?: boolean; }; }; export declare function makeEmbedConfig(config: EmbedConfig): Promise; export declare function makeEmbed(id: string, container: HTMLElement, src?: string): Promise; //# sourceMappingURL=pyret.d.ts.map