0.1.0 #1
19
src/tests.ts
19
src/tests.ts
@@ -1,6 +1,5 @@
|
|||||||
import { Call, ComposeLeft, Pipe } from "hotscript"
|
import { Call, ComposeLeft } from "hotscript"
|
||||||
import { Implements, TraitExpressionAbstractFn, TraitExpressionTraitsFn, abstract, expression, trait } from "."
|
import { Implements, TraitExpressionAbstractFn, abstract, expression, trait } from "."
|
||||||
import { Simplify } from "type-fest"
|
|
||||||
import { SimplifyFn } from "./util"
|
import { SimplifyFn } from "./util"
|
||||||
|
|
||||||
|
|
||||||
@@ -66,15 +65,15 @@ type Abs = Call<ComposeLeft<[
|
|||||||
SimplifyFn,
|
SimplifyFn,
|
||||||
]>, typeof exp>
|
]>, typeof exp>
|
||||||
|
|
||||||
exp.subtrait(
|
// exp.subtrait(
|
||||||
s => {
|
// s => {
|
||||||
interface Subtrait extends (typeof s) {
|
// interface Subtrait extends (typeof s) {
|
||||||
|
|
||||||
}
|
// }
|
||||||
|
|
||||||
return abstract<Subtrait>()
|
// return abstract<Subtrait>()
|
||||||
},
|
// },
|
||||||
)
|
// )
|
||||||
|
|
||||||
class User extends exp.extends implements Implements<typeof exp> {
|
class User extends exp.extends implements Implements<typeof exp> {
|
||||||
declare status: { _tag: "awaitingPayment" } | { _tag: "active"; activeSince: Date; expiresAt?: Date | undefined } | { _tag: "expired"; expiredSince: Date }
|
declare status: { _tag: "awaitingPayment" } | { _tag: "active"; activeSince: Date; expiresAt?: Date | undefined } | { _tag: "expired"; expiredSince: Date }
|
||||||
|
|||||||
Reference in New Issue
Block a user