/************ Processor: ts ************/ import * as __beyond_dep_ns_0 from 'events'; // children/index.ts declare namespace ns_0 { import DynamicProcessorImplementation = ns_9.DynamicProcessorImplementation; import Registered = ns_6._default; import Required = ns_7._default; import Monitor = ns_4._default; export type ChildrenType = Map; export class Children extends Registered { #private; get required(): Required; get monitor(): Monitor; get pending(): DynamicProcessorImplementation[]; /** * DP Children constructor * * @param dp {object} The parent dynamic processor * @param ready {function} The function to call when the children get ready */ constructor(dp: DynamicProcessorImplementation, ready: () => void); /** * The pendings are registered when the check(dp) function is called in the _prepared method * If the processor that is being requested is not processed, then it is registered as a pending dp * * @param required {DynamicProcessorImplementation} The pending dp * @param data {{id: string}} Information provided when the check function is called */ require(required: DynamicProcessorImplementation, data: { id: string; }): void; reset(): void; get prepared(): boolean; initialise(): void; update(): boolean; destroy(): void; } } // children/monitor/checkpoint.ts declare namespace ns_1 { import Children = ns_0.Children; export class _default { #private; constructor(children: Children, delay?: number); hang(reason?: string): void; set(): void; release(): void; } } // children/monitor/child.ts declare namespace ns_2 { import DynamicProcessorImplementation = ns_9.DynamicProcessorImplementation; type ReevaluateType = (child?: DynamicProcessorImplementation) => void; export class _default { #private; get child(): DynamicProcessorImplementation; constructor(child: DynamicProcessorImplementation, reevaluate: ReevaluateType); destroy(): void; } export {}; } // children/monitor/controller.ts declare namespace ns_3 { import DynamicProcessorImplementation = ns_9.DynamicProcessorImplementation; import Monitor = ns_4._default; /** * Avoid reprocessing the dp when the request ids of the children are the same as the last processing performed. * It occurs when the children are linked to each other. * This occurs when there are child processors that in turn are children of another. * * Ex: In the ts compiler, the compiler depends on the analyzer in the same way that dependencies.declarations * depends on the analyzer as well. */ export class _default { #private; /** * Dynamic processor processing state ids constructor * * @param dp {object} The dynamic processor * @param monitor {object} The dynamic processor monitor */ constructor(dp: DynamicProcessorImplementation, monitor: Monitor); /** * Check if the state of the children is the same as when the last processing was performed, and therefore, * it is not necessary to process again */ get updated(): boolean; update(): void; invalidate(): void; } } // children/monitor/index.ts declare namespace ns_4 { import DynamicProcessorImplementation = ns_9.DynamicProcessorImplementation; import Children = ns_0.Children; import Checkpoint = ns_1._default; import Child = ns_2._default; export class _default extends Map { #private; get checkpoint(): Checkpoint; /** * DP Monitor constructor * * @param dp {object} The dynamic processor * @param children {object} The dynamic processor children * @param ready {function} The function to call when the children get ready */ constructor(dp: DynamicProcessorImplementation, children: Children, ready: () => void); get items(): Set; get pending(): DynamicProcessorImplementation[]; get prepared(): boolean; /** * Set the child objects to initialise when not previously initialised, and to monitor for changes * * @return {boolean} Has the children collection changed? */ update(): boolean; /** * When the processor indicates in the _prepared method that it is not ready, even when the children are, * it calls this method to report the reason. * This occurs, for example, in cases where the processor detects that one of its children is not synchronized. */ hang(reason: string): void; initialise(): void; destroy(): void; } } // children/monitor/logs.ts declare namespace ns_5 { import DynamicProcessorImplementation = ns_9.DynamicProcessorImplementation; /** * For development debugging * * @param dp {object} The parent dynamic processor * @param child {object} The child processor */ export function _default(dp: DynamicProcessorImplementation, child?: DynamicProcessorImplementation): void; } // children/registered.ts declare namespace ns_6 { import DynamicProcessorImplementation = ns_9.DynamicProcessorImplementation; import ChildrenType = ns_0.ChildrenType; export class _default extends Map { #private; get dp(): DynamicProcessorImplementation; constructor(dp: DynamicProcessorImplementation); /** * Register children of the dp, can be additional to the previous registered children * * @param children {Map} The children specification * @param invalidate {boolean} If true, invalidates the dp after the registration of the children */ register(children: ChildrenType, invalidate?: boolean): void; unregister(children: string[], invalidate?: boolean): void; } } // children/required.ts declare namespace ns_7 { import DynamicProcessorImplementation = ns_9.DynamicProcessorImplementation; export class _default extends Map { /** * The pendings are registered when the check(dp) function is called in the _prepared method * If the processor that is being requested is not processed, then it is registered as a pending dp * * @param required {object} The required dp * @param data {{id: string}} Information provided when the check function is called */ register(required: DynamicProcessorImplementation, data: { id: string; }): void; reset(): void; } } // children/validate-child.ts declare namespace ns_8 { import DynamicProcessorImplementation = ns_9.DynamicProcessorImplementation; /** * Validates that the given child conforms to the expected DynamicProcessor shape. * * @param child - The object to validate as a dynamic processor. * @param name - Optional name for contextual error messages. * @throws Will throw if the child is invalid or misconfigured. */ export function _default(child: DynamicProcessorImplementation, name?: string): void; } // dp.ts declare namespace ns_9 { /// import EventEmitter = __beyond_dep_ns_0.EventEmitter; import Children = ns_0.Children; import ChildrenType = ns_0.ChildrenType; export interface IRequest { is: 'dynamic-processor'; value: number; } export type IProcessResponse = void | boolean | { notify?: boolean; changed?: boolean; }; export type Listener = (...args: any[]) => any; export type RequireType = (dp: DynamicProcessorImplementation, id: string) => boolean; export class DynamicProcessorImplementation { #private; get dp(): string; get autoincremented(): number; get id(): string; waitToProcess: number; notifyOnFirst: boolean; get children(): Children; /** * Dynamic processor setup * * @param children {ChildrenType} The children to register */ setup(children: ChildrenType): void; get ready(): Promise; _events: EventEmitter<[never]>; on(event: string, listener: Listener): EventEmitter<[never]>; off(event: string, listener: Listener): EventEmitter<[never]>; removeAllListeners: () => EventEmitter<[never]>; setMaxListeners: (n: number) => EventEmitter<[never]>; constructor(); get initialising(): boolean; get initialised(): boolean; _begin(): Promise; initialise(): Promise; get preparing(): boolean; _prepared(require: RequireType): boolean | string | undefined | void; get __prepared(): boolean | string; get first(): boolean; _notify(): void; get processing(): boolean; get processed(): boolean; _process(request: IRequest): IProcessResponse | Promise; get tu(): number; get _request(): IRequest; cancelled(request: IRequest): boolean; _invalidate(): void; get destroyed(): boolean; destroy(): void; } } // index.ts declare namespace ns_10 { import DynamicProcessorImplementation = ns_9.DynamicProcessorImplementation; type Constructor = new (...args: any[]) => T; type DPInstance = InstanceType; /** * DynamicProcessor is a mixin factory. * * Overloads keep constructor params and instance type when a Base is provided, * and expose the dynamic processor surface in both cases. * See overloads.md for why these overloads are required. */ export const DynamicProcessor: { (Base: TBase): new (...args: ConstructorParameters) => InstanceType & DPInstance; (): new () => DPInstance; }; export {}; } // logs/index.ts declare namespace ns_11 { export class Logs { #private; get store(): string; constructor(); append(message: string): void; } const _default: Logs; export { _default }; } export import ChildrenType = ns_0.ChildrenType; export import IRequest = ns_9.IRequest; export import IProcessResponse = ns_9.IProcessResponse; export import Listener = ns_9.Listener; export import RequireType = ns_9.RequireType; export import DynamicProcessorImplementation = ns_9.DynamicProcessorImplementation; export import DynamicProcessor = ns_10.DynamicProcessor; export declare const hmr: {on: (event: string, listener: any) => void, off: (event: string, listener: any) => void };