import { Observable, Subject } from 'rxjs'; import { DisplayFactory } from './display-utils'; import { Output, Scope } from './state'; import { AnyVirtualDOM } from '@youwol/rx-vdom'; export declare function extractKeys(obj: { [k: string]: unknown; } | string[]): string; /** * Execute a given javascript statement. This execution is reactive by default. * * @param _args * @param _args.src The source to execute * @param _args.scope The entering scope. * @param _args.output$ Subject in which output views are sent (when using `display` function). * @param _args.displayFactory Factory to display HTML elements when `display` is called. * @param _args.invalidated$ Observable that emits when the associated cell is invalidated. * @returns Promise over the scope at exit */ export declare function executeJsStatement({ src, scope, output$, displayFactory, invalidated$, }: { src: string; scope: Scope; output$: Subject; displayFactory: DisplayFactory; invalidated$: Observable; }): Promise; /** * Execute a given javascript source content. * * @param _args * @param _args.src The source to execute * @param _args.scope The entering scope. * @param _args.output$ Subject in which output views are sent (when using `display` function). * @param _args.displayFactory Factory to display HTML elements when `display` is called. * @param _args.load The function used to load a submodule from another notebook page. * @param _args.invalidated$ Observable that emits when the associated cell is invalidated. * @param _args.reactive If true, observables & promises are resolved before cell execution using a `combineLatest` * policy. * @returns Promise over the scope at exit */ export declare function executeJs({ src, scope, output$, displayFactory, load, reactive, invalidated$, }: { src: string; scope: Scope; output$: Subject; displayFactory: DisplayFactory; load: (path: string) => Promise<{ [k: string]: unknown; }>; reactive?: boolean; invalidated$: Observable; }): Promise; export declare function parseProgram(src: string): any; export declare function extractGlobalDeclarations(body: any): { const: string[]; let: string[]; }; export declare function extractUndefinedReferences(body: any, scope?: string[]): any;