Refactoring
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Julien Valverdé
2024-02-02 05:10:28 +01:00
parent 01d59f2cef
commit 29148cd42b
2 changed files with 62 additions and 34 deletions

View File

@@ -1,4 +1,4 @@
import { Implements, TraitAbstractMembers, extendsAndExpresses, trait } from "."
import { Implements, TraitAbstractMembers, expression, trait } from "."
const PrintsHelloOnNew = trait()(Super =>
@@ -44,21 +44,25 @@ const ActiveStatefulSubscription = trait<ActiveStatefulSubscriptionAbstractMembe
class TestSuperclass {
// id: number = 69
static test = 69
// static test = 69
}
const User = extendsAndExpresses(
TestSuperclass,
PrintsHelloOnNew,
Identifiable<bigint>(),
// Identifiable<number>()
).then(e =>
class User
extends e.extends()
implements Implements<typeof e> {
id: bigint = -1n
}
)
const builder = expression
.extends(TestSuperclass)
.expresses(
// PrintsHelloOnNew,
Identifiable<bigint>(),
// Identifiable<number>(),
)
type Impl = Implements<typeof builder.expression>
const exp = builder.get()
class User extends exp.extends() implements (typeof exp.implements) {
// id: bigint = -1n
}
console.log(new User())