import { Simplify } from "type-fest" import { TraitAbstractMembers, TraitClass, TraitImpl, TraitInstance, expresses, trait } from "." const PrintsHelloOnNew = trait()(Super => class PrintsHelloOnNew extends Super { constructor(...args: any[]) { super(...args) console.log("Hello!") } } ) const Identifiable = () => ( trait<{ readonly id: ID }>()(Super => class Identifiable extends Super { equals(el: Identifiable) { return this.id === el.id } } ) ) type Test = Simplify>>> const appliedIdentifiable = Identifiable().apply({} as any) const exp = expresses(Identifiable()) class User implements ReturnType { id: bigint = -1n }