Does anyone else get tired of how typescript makes you annotate class members multiple times? Or am I just holding it wrong? It seems like you should only need either the class member annotations, or the constructor annotations, not both.
export type MyClassOpts = {
a: string
b: string
c: string
}
class MyClass {
a: MyClassOpts['a']
b: MyClassOpts['b']
c: MyClassOpts['c']
constructor({a, b, c}: MyClassOpts) {
this.a = a
this.b = b
this.c = c
}
}