export type Dispose = () => void; type Subscriber = (value: T) => void; declare const SIGNAL_BRAND: unique symbol; export interface Getter { peek(): T; changed(fn: Subscriber): Dispose; subscribe(fn: Subscriber): Dispose; } export interface Setter { set(value: T | ((prev: T) => T)): void; } export declare class Signal implements Getter, Setter { #private; readonly [SIGNAL_BRAND] = true; constructor(value: T); static from(value: T | Signal): Signal; peek(): T; set(value: T, notify?: boolean): void; update(fn: (prev: T) => T, notify?: boolean): void; mutate(fn: (value: T) => R, notify?: boolean): R; subscribe(fn: Subscriber): Dispose; changed(fn: (value: T) => void): Dispose; watch(fn: Subscriber): Dispose; static race(...sigs: { [K in keyof T]: Signal; }): Promise>; } type SetterType = S extends Setter ? T : never; export declare class Effect { #private; constructor(fn?: (effect: Effect) => void); get(signal: Getter): T; set>(signal: S, value: SetterType, ...args: undefined extends SetterType ? [cleanup?: SetterType] : [cleanup: SetterType]): void; spawn(fn: () => Promise): void; timer(fn: () => void, ms: DOMHighResTimeStamp): void; timeout(fn: (effect: Effect) => void, ms: DOMHighResTimeStamp): void; animate(fn: (now: DOMHighResTimeStamp) => void): void; interval(fn: () => void, ms: DOMHighResTimeStamp): void; effect(fn: (effect: Effect) => void): void; subscribe(signal: Getter, fn: (value: T) => void): void; event(target: HTMLElement, type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void; event(target: SVGElement, type: K, listener: (this: SVGElement, ev: SVGElementEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void; event(target: Document, type: K, listener: (this: Document, ev: DocumentEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void; event(target: Window, type: K, listener: (this: Window, ev: WindowEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void; event(target: WebSocket, type: K, listener: (this: WebSocket, ev: WebSocketEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void; event(target: XMLHttpRequest, type: K, listener: (this: XMLHttpRequest, ev: XMLHttpRequestEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void; event(target: MediaQueryList, type: K, listener: (this: MediaQueryList, ev: MediaQueryListEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void; event(target: Animation, type: K, listener: (this: Animation, ev: AnimationEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void; event(target: EventSource, type: K, listener: (this: EventSource, ev: EventSourceEventMap[K]) => void, options?: boolean | AddEventListenerOptions): void; event(target: EventTarget, type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void; reload(): void; cleanup(fn: Dispose): void; close(): void; get closed(): Promise; get cancel(): Promise; } export {}; //# sourceMappingURL=index.d.ts.map