This commit is contained in:
16
src/tests.ts
16
src/tests.ts
@@ -28,14 +28,22 @@ const Identifiable = <ID>() => trait
|
||||
.build()
|
||||
|
||||
const StatefulSubscription = trait
|
||||
.abstract<{
|
||||
readonly isStatefulSubscription: true
|
||||
readonly status: (
|
||||
// .abstract<{
|
||||
// readonly isStatefulSubscription: true
|
||||
// readonly status: (
|
||||
// { _tag: "awaitingPayment" } |
|
||||
// { _tag: "active", activeSince: Date, expiresAt?: Date } |
|
||||
// { _tag: "expired", expiredSince: Date }
|
||||
// )
|
||||
// }>()
|
||||
.extendAbstract(Super => class extends Super {
|
||||
readonly isStatefulSubscription!: true
|
||||
readonly status!: (
|
||||
{ _tag: "awaitingPayment" } |
|
||||
{ _tag: "active", activeSince: Date, expiresAt?: Date } |
|
||||
{ _tag: "expired", expiredSince: Date }
|
||||
)
|
||||
}>()
|
||||
})
|
||||
.build()
|
||||
|
||||
type StatefulSubscriptionClass = Trait.Class<typeof StatefulSubscription>
|
||||
|
||||
Reference in New Issue
Block a user