0.1.21 #21

Merged
Thilawyn merged 23 commits from next into master 2024-05-12 01:11:51 +02:00
2 changed files with 5 additions and 3 deletions
Showing only changes of commit e0c705a24d - Show all commits

View File

@@ -104,7 +104,7 @@ export class EffectSchemaTraitExpressionBuilder<
mutableEncoded() { mutableEncoded() {
return new EffectSchemaTraitExpressionBuilder( 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.expressionSuperclassStatic,
this.expressionTraits, this.expressionTraits,
) )
@@ -112,7 +112,7 @@ export class EffectSchemaTraitExpressionBuilder<
immutableEncoded() { immutableEncoded() {
return new EffectSchemaTraitExpressionBuilder( 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.expressionSuperclassStatic,
this.expressionTraits, this.expressionTraits,
) )

View File

@@ -34,7 +34,7 @@ const userExp = effectSchemaExpression
role: S.Union(S.Literal("User"), S.Literal("Admin")), role: S.Union(S.Literal("User"), S.Literal("Admin")),
}) })
// .mutable() // .mutable()
// .mutableEncoded() .mutableEncoded()
.build() .build()
@userExp.staticImplements @userExp.staticImplements
@@ -43,6 +43,8 @@ export class User extends userExp.extends<User>() implements Implements<typeof u
static aStaticMethodThatShouldBeInherited() {} static aStaticMethodThatShouldBeInherited() {}
} }
User.Encoded
const user = new User({ id: 0n, role: "User" }) const user = new User({ id: 0n, role: "User" })
// user.id = 0n // user.id = 0n