1 | import type { Observable } from 'rxjs';
|
2 | import type { Codec } from '@polkadot/types/types';
|
3 | import type { DecorateFn, DecorateMethodOptions, ObsInnerType, StorageEntryPromiseOverloads } from '../types/index.js';
|
4 | interface Tracker<T> {
|
5 | reject: (value: Error) => Observable<never>;
|
6 | resolve: (value: T) => void;
|
7 | }
|
8 | type CodecReturnType<T extends (...args: unknown[]) => Observable<Codec>> = T extends (...args: any) => infer R ? R extends Observable<Codec> ? ObsInnerType<R> : never : never;
|
9 | export declare function promiseTracker<T>(resolve: (value: T) => void, reject: (value: Error) => void): Tracker<T>;
|
10 |
|
11 |
|
12 |
|
13 | export declare function toPromiseMethod<M extends DecorateFn<CodecReturnType<M>>>(method: M, options?: DecorateMethodOptions): StorageEntryPromiseOverloads;
|
14 | export {};
|