This commit is contained in:
nik
2025-10-03 22:27:28 +03:00
parent 829fad0e17
commit 871cf7e792
16520 changed files with 2967597 additions and 3 deletions

View File

@@ -0,0 +1,25 @@
/**
* The `useDisposables` hook returns a `disposables` object that is disposed
* when the component is unmounted.
*/
export declare function useDisposables(): {
addEventListener<TEventName extends keyof WindowEventMap>(element: Window | Document | HTMLElement, name: TEventName, listener: (event: WindowEventMap[TEventName]) => any, options?: boolean | AddEventListenerOptions | undefined): () => void;
requestAnimationFrame(callback: FrameRequestCallback): () => void;
nextFrame(callback: FrameRequestCallback): () => void;
setTimeout(callback: (...args: any[]) => void, ms?: number | undefined, ...args: any[]): () => void;
microTask(cb: () => void): () => void;
style(node: ElementCSSInlineStyle, property: string, value: string): () => void;
group(cb: (d: {
addEventListener<TEventName extends keyof WindowEventMap>(element: Window | Document | HTMLElement, name: TEventName, listener: (event: WindowEventMap[TEventName]) => any, options?: boolean | AddEventListenerOptions | undefined): () => void;
requestAnimationFrame(callback: FrameRequestCallback): () => void;
nextFrame(callback: FrameRequestCallback): () => void;
setTimeout(callback: (...args: any[]) => void, ms?: number | undefined, ...args: any[]): () => void;
microTask(cb: () => void): () => void;
style(node: ElementCSSInlineStyle, property: string, value: string): () => void;
group(cb: any): () => void;
add(cb: () => void): () => void;
dispose(): void;
}) => void): () => void;
add(cb: () => void): () => void;
dispose(): void;
};