No description
  • TypeScript 100%
Find a file
Mikkel ALMONTE--RINGAUD e6309ddd82
Some checks failed
Checks / checks (push) Failing after 55s
chore: release v0.5.0
2025-12-20 16:40:07 +01:00
.github chore: add FUNDING 2025-12-09 22:03:12 +01:00
.vscode chore: initialize 2025-08-09 16:20:36 +02:00
examples feat: add default value 2025-09-26 23:20:29 +02:00
src fix: optional path 2025-12-20 16:31:52 +01:00
.gitignore chore: initialize 2025-08-09 16:20:36 +02:00
bun.lock chore(deps): bump 2025-12-20 16:38:47 +01:00
bunup.config.ts refactor: migrate from tsup to bunup 2025-12-09 21:52:48 +01:00
CODE_OF_CONDUCT.md chore: add coc 2025-12-09 21:57:28 +01:00
eslint.config.ts chore: initialize 2025-08-09 16:20:36 +02:00
LICENSE chore: add license 2025-12-09 21:57:04 +01:00
package.json chore: release v0.5.0 2025-12-20 16:40:07 +01:00
README.md docs: add simple README 2025-12-09 22:02:27 +01:00
tsconfig.json refactor: migrate from tsup to bunup 2025-12-09 21:52:48 +01:00

Desero

Quickly write models to deserialize an object to another.

Installation

bun add desero

Usage

import { t, deserialize } from "desero";

class MyModel {
  public id = t.string();
}

const data = deserialize(MyModel, { id: "hello world" })
//    ^ { id: "hello world" }

You can find more examples in the examples directory.

Recipes

Use @rename to rebind properties

import { t, rename, deserialize } from "desero";

class MyModel {
  @rename("L")
  public label = t.string();
}

const data = deserialize(MyModel, { L: "hello world" });
data.label // = "hello world";