Javascript – Class constructor overloading in Typescript
I am working on a class PlaybackControl, I use it to create two HTMLElements: PlaybackControlButton: HTMLButtonElement PlaybackControlMenu: HTMLDivElement Now, to initialise the class object, I need three arguments: videoPlayer: HTMLVideoElement playbackRates: PlaybackRates options: PlaybackControlOptions where: type Shortcuts = Record<string, {…