Typescript - isolating a property from an interface
You can re-use an interface's property by extracting it using normal object access notation eg
interface SomeInterface {
usefulProperty: string | object {}
}
type newType = SomeInterface['usefulProperty']
// now newType is equal to string | ob...
jaxtrax.hashnode.dev1 min read