Skip to content

Instantly share code, notes, and snippets.

@ChlorUpload
Created June 16, 2022 09:07
Show Gist options
  • Save ChlorUpload/381b256ac78e4feb3b968f030922dc9d to your computer and use it in GitHub Desktop.
Save ChlorUpload/381b256ac78e4feb3b968f030922dc9d to your computer and use it in GitHub Desktop.
interface IBatterySize {
do(a: string, b: number): void;
}
class AA implements IBatterySize {
do(a: string, b: number) {}
}
class AAA implements IBatterySize {
do(a: string, b: number) {}
}
type BatteryClass = new () => IBatterySize;
const batteryClassStore: BatteryClass[] = [AA, AAA];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment