it-pushable
Advanced tools
Comparing version
@@ -1,24 +0,26 @@ | ||
export interface Pushable<T> extends AsyncIterable<T> { | ||
push: (value: T) => this, | ||
end: (err?: Error) => this | ||
} | ||
declare namespace pushable { | ||
export interface Pushable<T> extends AsyncIterable<T> { | ||
push: (value: T) => this, | ||
end: (err?: Error) => this | ||
} | ||
export interface PushableV<T> extends AsyncIterable<T[]> { | ||
push: (value: T) => this, | ||
end: (err?: Error) => this | ||
} | ||
export interface PushableV<T> extends AsyncIterable<T[]> { | ||
push: (value: T) => this, | ||
end: (err?: Error) => this | ||
} | ||
type Options = { | ||
onEnd?: (err?: Error) => void, | ||
writev?: false | ||
} | ||
type Options = { | ||
onEnd?: (err?: Error) => void, | ||
writev?: false | ||
} | ||
type OptionsV = { | ||
onEnd?: (err?: Error) => void, | ||
writev: true | ||
type OptionsV = { | ||
onEnd?: (err?: Error) => void, | ||
writev: true | ||
} | ||
} | ||
declare function pushable<T> (options?: Options): Pushable<T> | ||
declare function pushable<T> (options: OptionsV): PushableV<T> | ||
declare function pushable<T> (options?: pushable.Options): pushable.Pushable<T> | ||
declare function pushable<T> (options: pushable.OptionsV): pushable.PushableV<T> | ||
export = pushable |
{ | ||
"name": "it-pushable", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"description": "Pushable iterable", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
14121
0.71%368
0.55%