Closed
Description
is there a better way to express this, without explicitly listing out every member of the interface?
interface Foo {
a: string
}
// ok
class Bar implements Foo {
constructor (public a: string) {}
}
// Error: Class 'Baz' incorrectly implements interface 'Foo'.
// Property 'a' is missing in type 'Baz'
class Baz implements Foo {
constructor (a: Foo) {
Object.assign(this, a)
}
}