Inside the realm of Typescript 4.3.5
In what manner can I establish a type that consists solely of the public members and properties of another type? Take into account:
class Thing {
public name: string
private secret: string
public greet(): string {}
private curse(): string {}
}
My goal now is to create this specific type:
type PublicProps<Thing> = {
name: string
greet(): string
}
How can I turn this into a generic structure?
type PublicProps<T> = ?