Type 'X' has no properties in common with type 'Y'

TypeScript's weak type detection is being triggered. Because your interface has no required properties, technically any class would satisfy the interface (prior to TypeScript 2.4).

To resolve this error without changing your interface, simply add the optional property to your class:

export interface IClassHasMetaImplements {
    prototype?: any;
}

export class UserPermissionModel implements IClassHasMetaImplements {
    public test() {}
    prototype?: any;
}

Tags:

Typescript