-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[all] Add command prepare and fix builids
- Loading branch information
Showing
23 changed files
with
131 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
export declare type LevelsType = { | ||
export interface ILevelsType { | ||
[key: string]: number; | ||
}; | ||
export declare const LEVELS: LevelsType; | ||
export interface LevelsNamesType { | ||
} | ||
export declare const LEVELS: ILevelsType; | ||
export interface ILevelsNamesType { | ||
[index: number]: string; | ||
} | ||
export declare const LEVEL_NAMES: LevelsNamesType; | ||
export declare const LEVEL_NAMES: ILevelsNamesType; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { IControlerSubscribe, IControllerOptions, IObserverListener, IStream, IStreamSubscription } from './interfaces'; | ||
export declare class StreamController<T> implements IControlerSubscribe<T> { | ||
private _state; | ||
private _subscription; | ||
private _options; | ||
constructor(options?: IControllerOptions); | ||
add(value: T): void; | ||
addError(error: any): void; | ||
close(): void; | ||
readonly stream: IStream<T>; | ||
_subscribe(listener: IObserverListener<T>): IStreamSubscription; | ||
} | ||
export declare class EventController<T> implements IControlerSubscribe<T> { | ||
private _state; | ||
private _subscriptions; | ||
private _options; | ||
constructor(options: IControllerOptions); | ||
add(value: T): void; | ||
addError(error: any): void; | ||
close(): void; | ||
readonly stream: IStream<T>; | ||
_subscribe(listener: IObserverListener<T>): IStreamSubscription; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { EventController, StreamController } from './controller'; | ||
import { IStream } from './interfaces'; | ||
import { Stream } from './stream'; | ||
export { Stream, StreamController, EventController, }; | ||
export declare function fromItem(input: any): IStream<{}> | undefined; | ||
export declare function fromFunction<T>(subscriber: (controller: StreamController<T>) => void): IStream<T>; | ||
export declare function fromObservable<T>(input: any): IStream<T>; | ||
export declare function fromArray<T>(array: ArrayLike<T>): IStream<{}>; | ||
export declare function fromPromise<T>(promise: Promise<T>): IStream<{}>; | ||
export declare function fromIterator<T>(items: Iterable<T>): IStream<{}>; | ||
export declare function fromEvents(element: HTMLElement, eventName: string): IStream<{}>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
declare global { | ||
interface ISymbolConstructor { | ||
readonly observable: symbol; | ||
} | ||
} | ||
export interface IObserver<T> { | ||
next(value: T): void; | ||
error(error: any): void; | ||
complete(): void; | ||
} | ||
export declare type ISubscriberFunction<T> = ((observer: IObserver<T>) => (() => void) | IStreamSubscription); | ||
export interface IObserverListener<T> { | ||
onData(value: T): void; | ||
onError(error: any): void; | ||
onComplete(): void; | ||
} | ||
export interface IStreamSubscription { | ||
cancel(): void; | ||
} | ||
export interface IStream<T> { | ||
listen(onData?: (value: T) => void, onError?: (error: any) => void, onComplete?: () => void): IStreamSubscription; | ||
listen(listener?: IObserverListener<T>): IStreamSubscription; | ||
map(fn: () => void): IStream<T>; | ||
filter(fn: () => void): IStream<T>; | ||
pipe(...fns: Array<() => void>): IStream<T>; | ||
} | ||
export interface IControllerOptions { | ||
onListen?: () => void; | ||
onCancel?: () => void; | ||
} | ||
export interface IController<T> { | ||
stream: IStream<T>; | ||
add(value: T): void; | ||
addError(error: any): void; | ||
close(): void; | ||
} | ||
export interface IControlerSubscribe<T> extends IController<T> { | ||
_subscribe(listener: IObserverListener<T>): IStreamSubscription; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { IObserverListener, IStream, IStreamSubscription } from './interfaces'; | ||
export declare class BufferStreamSubscription<T> implements IStreamSubscription { | ||
private _listener; | ||
private _cancelHandler?; | ||
private _state; | ||
private _buff; | ||
constructor(_listener: IObserverListener<T>, _cancelHandler?: ((sub: any) => void) | undefined); | ||
_addData(data: T): void; | ||
_addError(error: any): void; | ||
_close(): void; | ||
_flush(): void; | ||
cancel(): void; | ||
} | ||
export declare abstract class Stream<T> implements IStream<T> { | ||
listen(listener?: IObserverListener<T>): IStreamSubscription; | ||
listen(onData?: (value: T) => void, onError?: (error: any) => void, onComplete?: () => void): IStreamSubscription; | ||
_createSubscription(listener: IObserverListener<T>): IStreamSubscription; | ||
map(fn: () => void): IStream<T>; | ||
filter(fn: () => void): IStream<T>; | ||
pipe(...fns: Array<() => void>): IStream<T>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { IObserverListener } from './interfaces'; | ||
export declare const noop: () => void; | ||
export declare function toObserver<T>(onData?: IObserverListener<T> | ((value: T) => void), onError?: (error: any) => void, onComplete?: () => void): IObserverListener<T>; | ||
export declare function runMethod(method?: (inputs?: any[]) => void, ...args: any[]): void; | ||
export declare function enqueue(fn: () => void): void; |