Working expresses
This commit is contained in:
13
src/tests.ts
13
src/tests.ts
@@ -1,6 +1,4 @@
|
||||
import { Booleans, Call, Compose, ComposeLeft, Match, Pipe, Tuples } from "hotscript"
|
||||
import { Implements, TraitAbstractMembers, TraitAbstractMembersFn, expresses, extendsAndExpresses, trait } from "."
|
||||
import { CheckExtendableFn, ExtendFn, Extendable, ExtendableFn, SimplifyFn } from "./util"
|
||||
import { Implements, TraitAbstractMembers, extendsAndExpresses, trait } from "."
|
||||
|
||||
|
||||
const PrintsHelloOnNew = trait()(Super =>
|
||||
@@ -45,7 +43,8 @@ const ActiveStatefulSubscription = trait<ActiveStatefulSubscriptionAbstractMembe
|
||||
|
||||
|
||||
class TestSuperclass {
|
||||
id: number = 69
|
||||
// id: number = 69
|
||||
static test = 69
|
||||
}
|
||||
|
||||
|
||||
@@ -54,11 +53,7 @@ const exp = extendsAndExpresses(
|
||||
Identifiable<bigint>(),
|
||||
// Identifiable<number>()
|
||||
)
|
||||
type ExpImpl = Implements<typeof exp>
|
||||
type ExpAbstractMembers = Pipe<typeof exp.traits, [
|
||||
Tuples.Map<TraitAbstractMembersFn>,
|
||||
]>
|
||||
type ExpExtendable = Extendable<ExpAbstractMembers>
|
||||
// type ExpImpl = ImplStaticMembersExtendable<typeof TestSuperclass, typeof exp.traits>
|
||||
|
||||
class User extends exp.extends() implements Implements<typeof exp> {
|
||||
id: bigint = -1n
|
||||
|
||||
Reference in New Issue
Block a user