declare let _$_: { new (): {}; } & typeof globalThis; declare class $ extends _$_ { } declare namespace $ { export type $ = typeof $$; export class $$ extends $ { static $: $; } namespace $$ { type $$ = $; } export {}; } declare namespace $ { var $mol_dom_context: typeof globalThis; } declare namespace $ { function $node_internal_check(name: string): boolean; } declare namespace $ { function $mol_promise_like(val: any): val is Promise; } declare namespace $ { function $mol_fail(error: any): never; } declare namespace $ { function $mol_fail_hidden(error: any): never; } declare namespace $ { function $mol_fail_catch(error: unknown): boolean; } declare namespace $ { function $mol_try(handler: () => Result): Result | Error; } declare namespace $ { function $mol_fail_log(error: unknown): boolean; } declare namespace $ { function $node_autoinstall(this: typeof $, name: string): void; } interface $node { [key: string]: any; } declare var $node: $node; declare namespace $ { function $mol_func_name(this: $, func: Function): string; function $mol_func_name_from(target: Target, source: Function): Target; } declare namespace $ { class $mol_error_mix extends AggregateError { readonly cause: Cause; name: string; constructor(message: string, cause?: Cause, ...errors: readonly Error[]); static [Symbol.toPrimitive](): string; static toString(): string; static make(...params: ConstructorParameters): $mol_error_mix<{}>; } } declare namespace $ { const $mol_ambient_ref: unique symbol; type $mol_ambient_context = $; function $mol_ambient(this: $ | void, overrides: Partial<$>): $; } declare namespace $ { function $mol_delegate(proto: Value, target: () => Value): Value; } declare namespace $ { const $mol_owning_map: WeakMap; function $mol_owning_allow(having: Having): having is Having & { destructor(): void; }; function $mol_owning_get(having: Having, Owner?: { new (): Owner; }): Owner | null; function $mol_owning_check(owner: Owner, having: Having): having is Having & { destructor(): void; }; function $mol_owning_catch(owner: Owner, having: Having): boolean; } declare namespace $ { type $mol_type_writable = { -readonly [P in keyof T]: T[P]; }; } declare namespace $ { class $mol_object2 { static $: $; [Symbol.toStringTag]: string; [$mol_ambient_ref]: $; get $(): $; set $(next: $); static create(this: new (init?: (instance: any) => void) => Instance, init?: (instance: $mol_type_writable) => void): Instance; static [Symbol.toPrimitive](): any; static toString(): any; static toJSON(): any; destructor(): void; static destructor(): void; toString(): string; } } declare namespace $ { namespace $$ { } const $mol_object_field: unique symbol; class $mol_object extends $mol_object2 { static make(this: This, config: Partial>): InstanceType; } } declare namespace $ { function $mol_env(): Record; } declare namespace $ { } declare namespace $ { function $mol_guid(length?: number, exists?: (id: string) => boolean): string; } declare namespace $ { enum $mol_wire_cursor { stale = -1, doubt = -2, fresh = -3, final = -4 } } declare namespace $ { class $mol_wire_pub extends Object { constructor(id?: string); [Symbol.toStringTag]: string; data: unknown[]; static get [Symbol.species](): ArrayConstructor; protected sub_from: number; get sub_list(): readonly $mol_wire_sub[]; get sub_empty(): boolean; sub_on(sub: $mol_wire_pub, pub_pos: number): number; sub_off(sub_pos: number): void; reap(): void; promote(): void; fresh(): void; complete(): void; get incompleted(): boolean; emit(quant?: $mol_wire_cursor): void; peer_move(from_pos: number, to_pos: number): void; peer_repos(peer_pos: number, self_pos: number): void; } } declare namespace $ { interface $mol_wire_sub extends $mol_wire_pub { temp: boolean; pub_list: $mol_wire_pub[]; track_on(): $mol_wire_sub | null; track_next(pub?: $mol_wire_pub): $mol_wire_pub | null; pub_off(pub_pos: number): void; track_cut(sub: $mol_wire_pub | null): void; track_off(sub: $mol_wire_pub | null): void; absorb(quant: $mol_wire_cursor, pos: number): void; destructor(): void; } } declare namespace $ { let $mol_wire_auto_sub: $mol_wire_sub | null; function $mol_wire_auto(next?: $mol_wire_sub | null): $mol_wire_sub | null; const $mol_wire_affected: ($mol_wire_sub | number)[]; } declare namespace $ { function $mol_dev_format_register(config: { header: (val: any, config: any) => any; hasBody: (val: any, config: any) => false; } | { header: (val: any, config: any) => any; hasBody: (val: any, config: any) => boolean; body: (val: any, config: any) => any; }): void; const $mol_dev_format_head: unique symbol; const $mol_dev_format_body: unique symbol; function $mol_dev_format_native(obj: any): any[]; function $mol_dev_format_auto(obj: any): any[]; function $mol_dev_format_element(element: string, style: object, ...content: any[]): any[]; let $mol_dev_format_span: (style: object, ...content: any[]) => any[]; let $mol_dev_format_div: (style: object, ...content: any[]) => any[]; let $mol_dev_format_ol: (style: object, ...content: any[]) => any[]; let $mol_dev_format_li: (style: object, ...content: any[]) => any[]; let $mol_dev_format_table: (style: object, ...content: any[]) => any[]; let $mol_dev_format_tr: (style: object, ...content: any[]) => any[]; let $mol_dev_format_td: (style: object, ...content: any[]) => any[]; let $mol_dev_format_accent: (...args: any[]) => any[]; let $mol_dev_format_strong: (...args: any[]) => any[]; let $mol_dev_format_string: (...args: any[]) => any[]; let $mol_dev_format_shade: (...args: any[]) => any[]; let $mol_dev_format_indent: (...args: any[]) => any[]; } declare namespace $ { class $mol_wire_pub_sub extends $mol_wire_pub implements $mol_wire_sub { protected pub_from: number; protected cursor: $mol_wire_cursor; get temp(): boolean; get pub_list(): $mol_wire_pub[]; track_on(): $mol_wire_sub | null; promote(): void; track_next(pub?: $mol_wire_pub): $mol_wire_pub | null; track_off(sub: $mol_wire_sub | null): void; pub_off(sub_pos: number): void; destructor(): void; track_cut(): void; complete(): void; complete_pubs(): void; absorb(quant?: $mol_wire_cursor, pos?: number): void; [$mol_dev_format_head](): any[]; get pub_empty(): boolean; } } declare namespace $ { class $mol_after_tick extends $mol_object2 { task: () => void; static promise: Promise | null; cancelled: boolean; constructor(task: () => void); destructor(): void; } } declare namespace $ { abstract class $mol_wire_fiber extends $mol_wire_pub_sub { readonly task: (this: Host, ...args: Args) => Result; readonly host?: Host | undefined; static warm: boolean; static planning: Set<$mol_wire_fiber>; static reaping: Set<$mol_wire_fiber>; static plan_task: $mol_after_tick | null; static plan(): void; static sync(): void; cache: Result | Error | Promise; get args(): Args; result(): Result | undefined; get incompleted(): boolean; field(): string; constructor(id: string, task: (this: Host, ...args: Args) => Result, host?: Host | undefined, args?: Args); plan(): this; reap(): void; toString(): string; toJSON(): string; [$mol_dev_format_head](): any[]; [$mol_dev_format_body](): null; get $(): any; emit(quant?: $mol_wire_cursor): void; fresh(): this | undefined; refresh(): void; abstract put(next: Result | Error | Promise): Result | Error | Promise; sync(): Awaited; async_raw(): Promise; async(): Promise & { destructor(): void; }; step(): Promise; destructor(): void; } } declare namespace $ { let $mol_compare_deep_cache: WeakMap>; function $mol_compare_deep(left: Value, right: Value): boolean; } declare namespace $ { type $mol_log3_event = { [key in string]: unknown; } & { time?: string; place: unknown; message: string; } & Fields; type $mol_log3_logger = (this: $, event: $mol_log3_event) => Res; let $mol_log3_come: $mol_log3_logger<{}>; let $mol_log3_done: $mol_log3_logger<{}>; let $mol_log3_fail: $mol_log3_logger<{}>; let $mol_log3_warn: $mol_log3_logger<{ hint: string; }>; let $mol_log3_rise: $mol_log3_logger<{}>; let $mol_log3_area: $mol_log3_logger<{}, () => void>; function $mol_log3_area_lazy(this: $, event: $mol_log3_event<{}>): () => void; let $mol_log3_stack: (() => void)[]; } declare namespace $ { class $mol_span extends $mol_object2 { readonly uri: string; readonly source: string; readonly row: number; readonly col: number; readonly length: number; constructor(uri: string, source: string, row: number, col: number, length: number); static unknown: $mol_span; static begin(uri: string, source?: string): $mol_span; static end(uri: string, source: string): $mol_span; static entire(uri: string, source: string): $mol_span; toString(): string; toJSON(): { uri: string; row: number; col: number; length: number; }; error(message: string, Class?: ErrorConstructor): Error; span(row: number, col: number, length: number): $mol_span; after(length?: number): $mol_span; slice(begin: number, end?: number): $mol_span; } } declare namespace $ { function $mol_tree2_to_string(this: $, tree: $mol_tree2): string; } declare namespace $ { function $mol_maybe(value: Value | null | undefined): Value[]; } declare namespace $ { type $mol_tree2_path = Array; type $mol_tree2_hack = (input: $mol_tree2, belt: $mol_tree2_belt, context: Context) => readonly $mol_tree2[]; type $mol_tree2_belt = Record>; class $mol_tree2 extends Object { readonly type: string; readonly value: string; readonly kids: readonly $mol_tree2[]; readonly span: $mol_span; constructor(type: string, value: string, kids: readonly $mol_tree2[], span: $mol_span); static list(kids: readonly $mol_tree2[], span?: $mol_span): $mol_tree2; list(kids: readonly $mol_tree2[]): $mol_tree2; static data(value: string, kids?: readonly $mol_tree2[], span?: $mol_span): $mol_tree2; data(value: string, kids?: readonly $mol_tree2[]): $mol_tree2; static struct(type: string, kids?: readonly $mol_tree2[], span?: $mol_span): $mol_tree2; struct(type: string, kids?: readonly $mol_tree2[]): $mol_tree2; clone(kids: readonly $mol_tree2[], span?: $mol_span): $mol_tree2; text(): string; static fromString(str: string, uri?: string): $mol_tree2; toString(): string; insert(value: $mol_tree2 | null, ...path: $mol_tree2_path): $mol_tree2; update(value: readonly $mol_tree2[], ...path: $mol_tree2_path): readonly $mol_tree2[]; select(...path: $mol_tree2_path): $mol_tree2; filter(path: string[], value?: string): $mol_tree2; hack_self(belt: $mol_tree2_belt, context?: Context): readonly $mol_tree2[]; hack(belt: $mol_tree2_belt, context?: Context): $mol_tree2[]; error(message: string, Class?: ErrorConstructor): Error; } class $mol_tree2_empty extends $mol_tree2 { constructor(); } } declare namespace $ { class $mol_error_syntax extends SyntaxError { reason: string; line: string; span: $mol_span; constructor(reason: string, line: string, span: $mol_span); } } declare namespace $ { function $mol_tree2_from_string(this: $, str: string, uri?: string): $mol_tree2; } declare namespace $ { function $mol_tree2_from_json(json: any, span?: $mol_span): $mol_tree2; } declare namespace $ { class $mol_term_color { static reset: (str: string) => string; static bold: (str: string) => string; static italic: (str: string) => string; static underline: (str: string) => string; static inverse: (str: string) => string; static hidden: (str: string) => string; static strike: (str: string) => string; static gray: (str: string) => string; static red: (str: string) => string; static green: (str: string) => string; static yellow: (str: string) => string; static blue: (str: string) => string; static magenta: (str: string) => string; static cyan: (str: string) => string; static Gray: (str: string) => string; static Red: (str: string) => string; static Green: (str: string) => string; static Yellow: (str: string) => string; static Blue: (str: string) => string; static Magenta: (str: string) => string; static Cyan: (str: string) => string; static ansi(open: number, close: number): (str: string) => string; } } declare namespace $ { function $mol_log3_node_make(level: keyof Console, output: 'stdout' | 'stderr', type: string, color: (str: string) => string): (this: $, event: $mol_log3_event<{}>) => () => void; } declare namespace $ { class $mol_wire_task extends $mol_wire_fiber { static getter(task: (this: Host, ...args: Args) => Result): (host: Host, args: Args) => $mol_wire_task; get temp(): boolean; complete(): void; put(next: Result | Error | Promise): Error | Result | Promise; destructor(): void; } } declare namespace $ { export function $mol_wire_sync(obj: Host): ObjectOrFunctionResultAwaited; type FunctionResultAwaited = Some extends (...args: infer Args) => infer Res ? (...args: Args) => Awaited : Some; type ConstructorResultAwaited = Some extends new (...args: infer Args) => infer Res ? new (...args: Args) => Res : {}; type MethodsResultAwaited = { [K in keyof Host]: FunctionResultAwaited; }; type ObjectOrFunctionResultAwaited = (Some extends (...args: any) => unknown ? FunctionResultAwaited : {}) & (Some extends Object ? MethodsResultAwaited & ConstructorResultAwaited : Some); export {}; } declare namespace $ { type $mol_run_error_context = { pid?: number; stdout: Buffer | string; stderr: Buffer | string; }; class $mol_run_error extends $mol_error_mix<{ timeout_kill?: boolean; pid?: number; signal?: NodeJS.Signals | null; status?: number | null; command: string; dir: string; }> { } const $mol_run_spawn: (...args: Parameters<(typeof $node)["child_process"]["spawn"]>) => import("child_process").ChildProcess; const $mol_run_spawn_sync: (...args: Parameters<(typeof $node)["child_process"]["spawnSync"]>) => import("child_process").SpawnSyncReturns; type $mol_run_options = { command: readonly string[] | string; dir: string; timeout?: number; env?: Record; }; class $mol_run extends $mol_object { static async_enabled(): boolean; static spawn(options: $mol_run_options): import("child_process").SpawnSyncReturns | $mol_run_error_context; static spawn_async({ dir, sync, timeout, command, env }: $mol_run_options & { sync?: boolean; }): import("child_process").SpawnSyncReturns | (Promise<$mol_run_error_context> & { destructor: () => void; }); static error_message(res?: $mol_run_error_context): string; } } declare namespace $ { } declare namespace $ { var $mol_dom: typeof globalThis; } declare namespace $ { function $mol_dom_render_children(el: Element | DocumentFragment, childNodes: NodeList | Array): void; } declare namespace $ { type $mol_type_partial_deep = Val extends object ? Val extends Function ? Val : { [field in keyof Val]?: $mol_type_partial_deep | undefined; } : Val; } declare namespace $ { let $mol_jsx_prefix: string; let $mol_jsx_crumbs: string; let $mol_jsx_booked: null | Set; let $mol_jsx_document: $mol_jsx.JSX.ElementClass['ownerDocument']; const $mol_jsx_frag = ""; function $mol_jsx>(Elem: string | ((props: Props, ...children: Children) => Element), props: Props, ...childNodes: Children): Element | DocumentFragment; namespace $mol_jsx.JSX { interface Element extends HTMLElement { class?: string; } interface ElementClass { attributes: {}; ownerDocument: Pick; childNodes: Array; valueOf(): Element; } type OrString = { [key in keyof Dict]: Dict[key] | string; }; type IntrinsicElements = { [key in keyof ElementTagNameMap]?: $.$mol_type_partial_deep>; }; interface IntrinsicAttributes { id?: string; xmlns?: string; } interface ElementAttributesProperty { attributes: {}; } interface ElementChildrenAttribute { } } } declare namespace $ { function $mol_jsx_attach(next: typeof $mol_jsx_document, action: () => Result): Result; } declare namespace $ { function $mol_const(value: Value): { (): Value; '()': Value; }; } declare namespace $ { const $mol_key_store: WeakMap; function $mol_key(value: Value): string; } declare namespace $ { class $mol_after_timeout extends $mol_object2 { delay: number; task: () => void; id: any; constructor(delay: number, task: () => void); destructor(): void; } } declare namespace $ { class $mol_after_frame extends $mol_after_timeout { task: () => void; constructor(task: () => void); } } declare namespace $ { function $mol_wire_method(host: Host, field: PropertyKey, descr?: TypedPropertyDescriptor<(...args: Args) => any>): { value: (this: Host, ...args: Args) => any; enumerable?: boolean; configurable?: boolean; writable?: boolean; get?: (() => (...args: Args) => any) | undefined; set?: ((value: (...args: Args) => any) => void) | undefined; }; } declare namespace $ { type $mol_type_tail = ((...tail: Tuple) => any) extends ((head: any, ...tail: infer Tail) => any) ? Tail : never; } declare namespace $ { type $mol_type_foot = Tuple['length'] extends 0 ? never : Tuple[$mol_type_tail['length']]; } declare namespace $ { class $mol_wire_atom extends $mol_wire_fiber { static solo(host: Host, task: (this: Host, ...args: Args) => Result): $mol_wire_atom; static plex(host: Host, task: (this: Host, ...args: Args) => Result, key: Args[0]): $mol_wire_atom; static watching: Set<$mol_wire_atom>; static watcher: $mol_after_frame | null; static watch(): void; watch(): void; resync(args: Args): Error | Result | Promise; once(): Awaited; channel(): ((next?: $mol_type_foot) => Awaited) & { atom: $mol_wire_atom; }; destructor(): void; put(next: Result | Error | Promise): Error | Result | Promise; } } declare namespace $ { function $mol_wire_field(host: Host, field: Field, descr?: TypedPropertyDescriptor): any; } declare namespace $ { export function $mol_wire_solo(host: object, field: string, descr?: TypedPropertyDescriptor<(...args: Args) => any>): TypedPropertyDescriptor<(...args: First_optional) => any>; type First_optional = Args extends [] ? [] : [Args[0] | undefined, ...$mol_type_tail]; export {}; } declare namespace $ { function $mol_wire_plex(host: object, field: string, descr?: TypedPropertyDescriptor<(...args: Args) => any>): { value: (this: typeof host, ...args: Args) => any; enumerable?: boolean; configurable?: boolean; writable?: boolean; get?: (() => (...args: Args) => any) | undefined; set?: ((value: (...args: Args) => any) => void) | undefined; }; } declare namespace $ { let $mol_mem: typeof $mol_wire_solo; let $mol_mem_key: typeof $mol_wire_plex; } declare namespace $ { abstract class $mol_jsx_view extends $mol_object2 { static of(this: This, node: Element): InstanceType; attributes: Partial>>; ownerDocument: typeof $mol_jsx_document; className: string; get childNodes(): Array; valueOf(): HTMLElement; abstract render(): HTMLElement; } } declare namespace $ { function $mol_wire_probe(task: () => Value, def?: Value): Value | undefined; } declare namespace $ { function $mol_wire_solid(): void; } declare namespace $ { function $mol_wire_watch(): void; } declare namespace $ { export function $mol_wire_async(obj: Host): ObjectOrFunctionResultPromisify; type FunctionResultPromisify = Some extends (...args: infer Args) => infer Res ? Res extends PromiseLike ? Some : (...args: Args) => Promise : Some; type MethodsResultPromisify = { [K in keyof Host]: FunctionResultPromisify; }; type ObjectOrFunctionResultPromisify = (Some extends (...args: any) => unknown ? FunctionResultPromisify : {}) & (Some extends Object ? MethodsResultPromisify : Some); export {}; } declare namespace $ { function $mol_wire_race any)[]>(...tasks: Tasks): { [index in keyof Tasks]: ReturnType; }; } declare namespace $ { class $mol_state_time extends $mol_object { static task(precision: number, reset?: null): $mol_after_timeout | $mol_after_frame; static now(precision: number): number; } } declare namespace $ { function $mol_wire_easing(next: any): any; } declare namespace $ { function $mol_wire_patch(obj: object): void; } declare namespace $ { type $mol_type_result = Func extends (...params: any) => infer Result ? Result : Func extends new (...params: any) => infer Result ? Result : never; } declare namespace $ { function $mol_wire_let(host: Host): Host & { [Field in keyof Host]: { atom: $mol_wire_atom any>>, $mol_type_result>; }; }; } declare namespace $ { class $mol_wire_set extends Set { pub: $mol_wire_pub; has(value: Value): boolean; entries(): SetIterator<[Value, Value]>; keys(): SetIterator; values(): SetIterator; forEach(task: (value: Value, value2: Value, set: Set) => void, self?: any): void; [Symbol.iterator](): SetIterator; get size(): number; add(value: Value): this; delete(value: Value): boolean; clear(): void; item(val: Value, next?: boolean): boolean; } } declare namespace $ { function $mol_wire_proxy_pub(id: string, target: object): $mol_wire_pub; function $mol_wire_proxy(id: string, target: Target): Target; } declare namespace $ { class $mol_wire_dict extends Map { pub: $mol_wire_pub; has(key: Key): boolean; get(key: Key): Value | undefined; entries(): MapIterator<[Key, Value]>; keys(): MapIterator; values(): MapIterator; forEach(task: (value: Value, key: Key, dict: Map) => void, self?: any): void; [Symbol.iterator](): MapIterator<[Key, Value]>; get size(): number; set(key: Key, value: Value): this; delete(key: Key): boolean; clear(): void; item(key: Key, next?: Value | null): NonNullable | null; } } declare namespace $ { class $mol_promise extends Promise { done: (value: Result | PromiseLike) => void; fail: (reason?: any) => void; constructor(executor?: (done: (value: Result | PromiseLike) => void, fail: (reason?: any) => void) => void); } } declare namespace $ { function $mol_wait_timeout_async(this: $, timeout: number): Promise; function $mol_wait_timeout(this: $, timeout: number): void; } declare namespace $ { class $mol_wire_log extends $mol_object2 { static watch(task?: () => any): (() => any) | undefined; static track(fiber: $mol_wire_fiber): any; static active(): void; } } export = $; //# sourceMappingURL=node.d.ts.map