Closed samchon closed 3 years ago
To extendability, it would better to configure the object typed options parameter.
export class WebConnector { // NOT EXTENTABLE public async connection(url: string, timeout?: number): Promise<void>; // EXTENDABLE public async connect(url: string, options: WebConnector.IConnectOptions): Promise<void>; } export namespace WebConnector { export interface IConnectOptions { timeout: number } }
To extendability, it would better to configure the object typed options parameter.