It would better to refactor connector classes to assign header in the constructor level like below. To implement this refactoring without duplicated codes, it would better to refactor all of the connector class to be derived from an abstract class - #41. Also, the header are essential at now, but it would better to reform the header can be null.
export class WebConnector<
Header extends object | null,
Provider extends object | null>
{
public constructor(header: Header, provider: Provider);
}
It would better to refactor connector classes to assign header in the constructor level like below. To implement this refactoring without duplicated codes, it would better to refactor all of the connector class to be derived from an abstract class - #41. Also, the header are essential at now, but it would better to reform the header can be null.