This commit is contained in:
@@ -3,15 +3,15 @@ import { extendsAndExpresses, trait } from "./trait-inheritance"
|
|||||||
|
|
||||||
const Identified = <ID>() =>
|
const Identified = <ID>() =>
|
||||||
trait(Parent => {
|
trait(Parent => {
|
||||||
abstract class Identified<ID> extends Parent {
|
abstract class Identified extends Parent {
|
||||||
abstract id: ID
|
abstract id: ID
|
||||||
|
|
||||||
equals(el: Identified<ID>) {
|
equals(el: Identified) {
|
||||||
return this.id === el.id
|
return this.id === el.id
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Identified<ID>
|
return Identified
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user