source: trip-planner-front/node_modules/rxjs/internal/observable/fromEvent.d.ts@ ceaed42

Last change on this file since ceaed42 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 2.1 KB
Line 
1import { Observable } from '../Observable';
2export interface NodeStyleEventEmitter {
3 addListener: (eventName: string | symbol, handler: NodeEventHandler) => this;
4 removeListener: (eventName: string | symbol, handler: NodeEventHandler) => this;
5}
6export declare type NodeEventHandler = (...args: any[]) => void;
7export interface NodeCompatibleEventEmitter {
8 addListener: (eventName: string, handler: NodeEventHandler) => void | {};
9 removeListener: (eventName: string, handler: NodeEventHandler) => void | {};
10}
11export interface JQueryStyleEventEmitter {
12 on: (eventName: string, handler: Function) => void;
13 off: (eventName: string, handler: Function) => void;
14}
15export interface HasEventTargetAddRemove<E> {
16 addEventListener(type: string, listener: ((evt: E) => void) | null, options?: boolean | AddEventListenerOptions): void;
17 removeEventListener(type: string, listener?: ((evt: E) => void) | null, options?: EventListenerOptions | boolean): void;
18}
19export declare type EventTargetLike<T> = HasEventTargetAddRemove<T> | NodeStyleEventEmitter | NodeCompatibleEventEmitter | JQueryStyleEventEmitter;
20export declare type FromEventTarget<T> = EventTargetLike<T> | ArrayLike<EventTargetLike<T>>;
21export interface EventListenerOptions {
22 capture?: boolean;
23 passive?: boolean;
24 once?: boolean;
25}
26export interface AddEventListenerOptions extends EventListenerOptions {
27 once?: boolean;
28 passive?: boolean;
29}
30export declare function fromEvent<T>(target: FromEventTarget<T>, eventName: string): Observable<T>;
31/** @deprecated resultSelector no longer supported, pipe to map instead */
32export declare function fromEvent<T>(target: FromEventTarget<T>, eventName: string, resultSelector: (...args: any[]) => T): Observable<T>;
33export declare function fromEvent<T>(target: FromEventTarget<T>, eventName: string, options: EventListenerOptions): Observable<T>;
34/** @deprecated resultSelector no longer supported, pipe to map instead */
35export declare function fromEvent<T>(target: FromEventTarget<T>, eventName: string, options: EventListenerOptions, resultSelector: (...args: any[]) => T): Observable<T>;
Note: See TracBrowser for help on using the repository browser.