From 11335f10cd9071d884b139dc673bd0bba5dbdef5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Valverd=C3=A9?= Date: Wed, 31 Jan 2024 05:21:56 +0100 Subject: [PATCH] Expresses work --- src/expresses.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/expresses.ts b/src/expresses.ts index fed933a..189b81e 100644 --- a/src/expresses.ts +++ b/src/expresses.ts @@ -1,6 +1,6 @@ -import { Fn, Pipe, Tuples } from "hotscript" +import { Call, Fn, Pipe, Tuples } from "hotscript" import { AbstractClass, Opaque, Simplify } from "type-fest" -import { Trait, TraitAbstractMembersFn, TraitApplierSuperTag } from "." +import { Trait, TraitAbstractMembersFn, TraitApplierSuperTag, TraitImplInstanceFn } from "." import { ExtendFn } from "./util" @@ -13,7 +13,16 @@ class TraitsExpression< readonly traits: Traits, ) {} - extends() { + extends(): ( + AbstractClass< + Call, + ...Call, Traits>, + ]>, + + ConstructorParameters + > + ) { return this.traits.reduce( (previous, trait) => trait.apply(previous), this.superclass as Opaque,