Update API Promise combineLatest signature (#528)
This commit is contained in:
@@ -244,7 +244,7 @@ export default class ApiPromise extends ApiBase<DecoratedRpc, QueryableStorage,
|
||||
* });
|
||||
* ```
|
||||
*/
|
||||
combineLatest (fns: Array<CombinatorFunction>, callback: CombinatorCallback): UnsubFunction {
|
||||
combineLatest (fns: Array<CombinatorFunction | [Array<any>, CombinatorFunction]>, callback: CombinatorCallback): UnsubFunction {
|
||||
const combinator = new Combinator(fns, callback);
|
||||
|
||||
return (): void => {
|
||||
|
||||
@@ -25,6 +25,11 @@ export interface DecoratedRpc {
|
||||
system: DecoratedRpc$Section;
|
||||
}
|
||||
|
||||
export interface QueryableStorageFunction$Subscribe {
|
||||
(arg: any, cb: (value?: any | null) => any): UnsubFunction;
|
||||
(cb: (value?: any | null) => any): UnsubFunction;
|
||||
}
|
||||
|
||||
export interface QueryableStorageFunction extends StorageFunction {
|
||||
(cb: (value?: any | null) => any): UnsubFunction;
|
||||
(arg: any, cb: (value?: any | null) => any): UnsubFunction;
|
||||
@@ -32,7 +37,7 @@ export interface QueryableStorageFunction extends StorageFunction {
|
||||
at: (hash: Hash, arg?: any) => Promise<Codec | null | undefined>;
|
||||
// This one is slightly more sane with regards to type-checking, requiring less boilerplate to
|
||||
// coax the intent of the the actual function with a split between subs and calls
|
||||
subscribe: ((arg: any, cb: (value?: any | null) => any) => UnsubFunction) | ((cb: (value?: any | null) => any) => UnsubFunction);
|
||||
subscribe: QueryableStorageFunction$Subscribe;
|
||||
}
|
||||
|
||||
export interface QueryableModuleStorage {
|
||||
|
||||
Reference in New Issue
Block a user