This commit is contained in:
@@ -1,17 +1,18 @@
|
||||
import { Simplify } from "type-fest"
|
||||
import { Implements, Trait, abstract, expression, trait } from "."
|
||||
import { Pipe } from "hotscript"
|
||||
|
||||
|
||||
const PrintsHelloOnNew = trait(
|
||||
abstract(),
|
||||
Super => class PrintsHelloOnNew extends Super {
|
||||
static readonly isPrintsHelloOnNew = true
|
||||
|
||||
constructor(...args: any[]) {
|
||||
super(...args)
|
||||
console.log("Hello!")
|
||||
}
|
||||
},
|
||||
)
|
||||
type PrintsHelloOnNewClass = Trait.Class<typeof PrintsHelloOnNew>
|
||||
|
||||
const Identifiable = <ID>() => trait(
|
||||
abstract<{ readonly id: ID }>(),
|
||||
@@ -34,6 +35,7 @@ const StatefulSubscription = trait(
|
||||
|
||||
Super => class StatefulSubscription extends Super {},
|
||||
)
|
||||
type StatefulSubscriptionClass = Trait.Class<typeof StatefulSubscription>
|
||||
|
||||
const ActiveStatefulSubscription = expression
|
||||
.expresses(StatefulSubscription)
|
||||
@@ -51,7 +53,7 @@ const ActiveStatefulSubscription = expression
|
||||
Super => class ActiveStatefulSubscription extends Super {},
|
||||
)
|
||||
|
||||
type T = Trait.Instance<typeof ActiveStatefulSubscription>
|
||||
// type T = Trait.Instance<typeof ActiveStatefulSubscription>
|
||||
|
||||
|
||||
class TestSuperclass {
|
||||
|
||||
Reference in New Issue
Block a user