This commit is contained in:
@@ -3,10 +3,10 @@ import { expresses, trait } from "."
|
||||
|
||||
const Identifiable = <ID>() =>
|
||||
trait(Parent => {
|
||||
abstract class Identified extends Parent {
|
||||
abstract id: ID
|
||||
abstract class Identifiable extends Parent {
|
||||
abstract readonly id: ID
|
||||
|
||||
equals(el: Identified) {
|
||||
equals(el: Identifiable) {
|
||||
return this.id === el.id
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ const Identifiable = <ID>() =>
|
||||
}
|
||||
}
|
||||
|
||||
return Identified
|
||||
return Identifiable
|
||||
})
|
||||
|
||||
const ImplementsIdentifiable = <ID>(defaultID: ID) =>
|
||||
|
||||
Reference in New Issue
Block a user