0.1.21 #21
@@ -104,7 +104,7 @@ export class EffectSchemaTraitExpressionBuilder<
|
||||
|
||||
mutableEncoded() {
|
||||
return new EffectSchemaTraitExpressionBuilder(
|
||||
this.expressionSuperclass as S.Class<unknown, Fields, Readonly<I>, R, C, Inherited, Proto>,
|
||||
this.expressionSuperclass as S.Class<unknown, Fields, Types.Mutable<I>, R, C, Inherited, Proto>,
|
||||
this.expressionSuperclassStatic,
|
||||
this.expressionTraits,
|
||||
)
|
||||
@@ -112,7 +112,7 @@ export class EffectSchemaTraitExpressionBuilder<
|
||||
|
||||
immutableEncoded() {
|
||||
return new EffectSchemaTraitExpressionBuilder(
|
||||
this.expressionSuperclass as S.Class<unknown, Fields, Types.Mutable<I>, R, C, Inherited, Proto>,
|
||||
this.expressionSuperclass as S.Class<unknown, Fields, Readonly<I>, R, C, Inherited, Proto>,
|
||||
this.expressionSuperclassStatic,
|
||||
this.expressionTraits,
|
||||
)
|
||||
|
||||
@@ -34,7 +34,7 @@ const userExp = effectSchemaExpression
|
||||
role: S.Union(S.Literal("User"), S.Literal("Admin")),
|
||||
})
|
||||
// .mutable()
|
||||
// .mutableEncoded()
|
||||
.mutableEncoded()
|
||||
.build()
|
||||
|
||||
@userExp.staticImplements
|
||||
@@ -43,6 +43,8 @@ export class User extends userExp.extends<User>() implements Implements<typeof u
|
||||
static aStaticMethodThatShouldBeInherited() {}
|
||||
}
|
||||
|
||||
User.Encoded
|
||||
|
||||
const user = new User({ id: 0n, role: "User" })
|
||||
// user.id = 0n
|
||||
|
||||
|
||||
Reference in New Issue
Block a user