0.1.0 #1

Merged
Thilawyn merged 24 commits from next into master 2024-01-05 00:39:33 +01:00
2 changed files with 5 additions and 2 deletions
Showing only changes of commit 680c3d8617 - Show all commits

View File

@@ -32,7 +32,7 @@ export function makeSchemableClass<
schemaWithDefaultValues,
} as const satisfies SchemableConfig
return class {
return class SchemableObject {
static readonly $schemableConfig = $schemableConfig
static readonly schema = schema
static readonly schemaWithDefaultValues = schemaWithDefaultValues

View File

@@ -13,4 +13,7 @@ const UserSchemaObject = makeSchemableClass({ schema: UserSchema })
class User extends UserSchemaObject {}
const user1 = new User({ id: 1n })
const user2 = newSchemable(User)
const user2 = newSchemable(User, { id: 2n })
console.log(user1)
console.log(user2)