-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
When I try to implement 'Person' on a class like:
import { Person as PersonSchema } from 'schema-dts';
export class Person implements PersonSchema { ... }TS errors with
A class can only implement an object type or intersection of object types with statically known members.
Which can be solved by editing this snippet:
export declare type Person = ({
"@type": "Person";
} & PersonBase) | Patient;to
export declare type Person = ({
"@type": "Person";
} & PersonBase);Obviously, this case is true for any type declaration in the pattern (...) | [TYPE]. The same applies to extending interfaces.
What is the reason for this pattern? Is it intended?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels