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?
When I try to implement 'Person' on a class like:
TS errors with
Which can be solved by editing this snippet:
to
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?