An open API service indexing awesome lists of open source software.

https://github.com/justinmchase/serializable

Serializable type definitions for TypeScript
https://github.com/justinmchase/serializable

deno javascript-library jsr typescript

Last synced: 26 days ago
JSON representation

Serializable type definitions for TypeScript

Awesome Lists containing this project

README

        

# serializable

Serializable type definitions for TypeScript and a helper function to convert
anything into a safely serializable value.

## Usage

```ts
import { toSerializable } from "jsr:@justinmchase/serializable";

export function send(message: unknown) {
const serializable = toSerializable(message);
return JSON.stringify(message); // will now throw
}
```