export declare class Chain implements Scope { readonly name: string; readonly parent: null | Scope; readonly id: number; readonly root: Scope; private destroyed; private readonly destroyCallbacks; constructor(name: string, parent: null | Scope); destroy(): void; onDestroy(callback: Scope.Callback): void; } export interface Scope { readonly name: string; readonly id: number; readonly parent: null | Scope; readonly root: Scope; onDestroy(callback: Scope.Callback): void; } export declare namespace Scope { type Callback = (scope: Scope) => void; function get(name?: string): null | Scope; function run(name: string, callback: (scope: Scope) => Result | Promise): Promise; }