Skip to content

Commit

Permalink
feat: mark Entity and Model to be regular classes
Browse files Browse the repository at this point in the history
The Model/Entity being abstract caused compilation errors as TS 4.2
reinforces abstract checks.

https://devblogs.microsoft.com/typescript/announcing-typescript-4-2/
microsoft/TypeScript#36392

Signed-off-by: Raymond Feng <enjoyjava@gmail.com>
  • Loading branch information
raymondfeng authored and pktippa committed May 1, 2021
1 parent 3a1c4fc commit c591bcd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/repository/src/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ function asObject(value: any, options?: Options): any {
/**
* Base class for models
*/
export abstract class Model {
export class Model {
static get modelName(): string {
return this.definition?.name || this.name;
}
Expand Down Expand Up @@ -418,7 +418,7 @@ export abstract class ValueObject extends Model implements Persistable {}
/**
* Base class for entities which have unique ids
*/
export abstract class Entity extends Model implements Persistable {
export class Entity extends Model implements Persistable {
/**
* Get the names of identity properties (primary keys).
*/
Expand Down

0 comments on commit c591bcd

Please sign in to comment.