Add generic restriction to LcdModuleSetup

This commit is contained in:
Simon Warta 2020-07-07 11:37:31 +02:00
parent c85c172395
commit ad07231bf3
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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;