@hpcc-js/observablehq-compiler
Version:
hpcc-js - ObservableHQ Compiler (unoffical)
30 lines (29 loc) • 1.17 kB
TypeScript
import type { ohq } from "./observable-shim.ts";
interface Ref {
start: number;
end: number;
newText: string;
}
export interface Refs {
inputs: string[];
args: string[];
patches: Ref[];
}
export declare function createFunction(refs: Refs, async?: boolean, generator?: boolean, blockStatement?: boolean, body?: string): any;
export declare const isRelativePath: (path: string) => boolean;
export declare const fixRelativeUrl: (path: string, basePath: string) => string;
export declare function obfuscatedImport(url: string): Promise<any>;
interface ParsedOJS {
ojs: string;
offset: number;
inlineMD: boolean;
cell: any;
error: any;
}
export declare function encodeBacktick(str: string): string;
export declare function notebook2ojs(_: string): ParsedOJS[];
export declare function ojs2notebook(ojs: string): ohq.Notebook;
export declare function omd2notebook(omd: string): ohq.Notebook;
export declare function fetchEx(url: string, proxyPrefix?: string, proxyPostfix?: string): Promise<Response>;
export declare function download(impUrl: string, proxyPrefix?: string, proxyPostfix?: string): Promise<ohq.Notebook>;
export {};