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() {
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,
)

View File

@@ -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