Add generic restriction to LcdModuleSetup
This commit is contained in:
parent
c85c172395
commit
ad07231bf3
@ -22,7 +22,7 @@ export function normalizeLcdApiArray<T>(backend: LcdApiArray<T>): readonly T[] {
|
||||
|
||||
export type LcdModule = Record<string, (...args: any[]) => any>;
|
||||
|
||||
type LcdModuleSetup<M> = (base: LcdClient) => M;
|
||||
type LcdModuleSetup<M extends LcdModule> = (base: LcdClient) => M;
|
||||
|
||||
export interface LcdClientBaseOptions {
|
||||
readonly apiUrl: string;
|
||||
|
||||
2
packages/sdk38/types/lcdapi/lcdclient.d.ts
vendored
2
packages/sdk38/types/lcdapi/lcdclient.d.ts
vendored
@ -12,7 +12,7 @@ import {
|
||||
export declare type LcdApiArray<T> = readonly T[] | null;
|
||||
export declare function normalizeLcdApiArray<T>(backend: LcdApiArray<T>): readonly T[];
|
||||
export declare type LcdModule = Record<string, (...args: any[]) => any>;
|
||||
declare type LcdModuleSetup<M> = (base: LcdClient) => M;
|
||||
declare type LcdModuleSetup<M extends LcdModule> = (base: LcdClient) => M;
|
||||
export interface LcdClientBaseOptions {
|
||||
readonly apiUrl: string;
|
||||
readonly broadcastMode?: BroadcastMode;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user