Generic trait fix
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Julien Valverdé
2023-12-28 05:35:45 +01:00
parent f619f47fc3
commit 26adebda54

View File

@@ -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
}) })