/** * @import { * Tickable, * ScopeParams, * DOMTarget, * ReactRef, * AngularRef, * DOMTargetSelector, * DefaultsParams, * ScopeConstructorCallback, * ScopeCleanupCallback, * Revertible, * ScopeMethod, * ScopedCallback, * } from '../types/index.js' */ export class Scope { /** @param {ScopeParams} [parameters] */ constructor(parameters?: ScopeParams); /** @type {DefaultsParams} */ defaults: DefaultsParams; /** @type {Document|DOMTarget} */ root: Document | DOMTarget; /** @type {Array} */ constructors: Array; /** @type {Array} */ revertConstructors: Array; /** @type {Array} */ revertibles: Array; /** @type {Array Tickable)>} */ constructorsOnce: Array Tickable)>; /** @type {Array} */ revertConstructorsOnce: Array; /** @type {Array} */ revertiblesOnce: Array; /** @type {Boolean} */ once: boolean; /** @type {Number} */ onceIndex: number; /** @type {Record} */ methods: Record; /** @type {Record} */ matches: Record; /** @type {Record} */ mediaQueryLists: Record; /** @type {Record} */ data: Record; /** * @param {Revertible} revertible */ register(revertible: Revertible): void; /** * @template T * @param {ScopedCallback} cb * @return {T} */ execute(cb: ScopedCallback): T; /** * @return {this} */ refresh(): this; /** * @overload * @param {String} a1 * @param {ScopeMethod} a2 * @return {this} * * @overload * @param {ScopeConstructorCallback} a1 * @return {this} * * @param {String|ScopeConstructorCallback} a1 * @param {ScopeMethod} [a2] */ add(a1: string, a2: ScopeMethod): this; /** * @overload * @param {String} a1 * @param {ScopeMethod} a2 * @return {this} * * @overload * @param {ScopeConstructorCallback} a1 * @return {this} * * @param {String|ScopeConstructorCallback} a1 * @param {ScopeMethod} [a2] */ add(a1: ScopeConstructorCallback): this; /** * @param {ScopeConstructorCallback} scopeConstructorCallback * @return {this} */ addOnce(scopeConstructorCallback: ScopeConstructorCallback): this; /** * @param {(scope: this) => Tickable} cb * @return {Tickable} */ keepTime(cb: (scope: this) => Tickable): Tickable; /** * @param {Event} e */ handleEvent(e: Event): void; revert(): void; } export function createScope(params?: ScopeParams): Scope; import type { DefaultsParams } from '../types/index.js'; import type { DOMTarget } from '../types/index.js'; import type { ScopeConstructorCallback } from '../types/index.js'; import type { ScopeCleanupCallback } from '../types/index.js'; import type { Revertible } from '../types/index.js'; import type { Tickable } from '../types/index.js'; import type { ScopeMethod } from '../types/index.js'; import type { ScopedCallback } from '../types/index.js'; import type { ScopeParams } from '../types/index.js';