https://github.com/justinmchase/serializable
Serializable type definitions for TypeScript
https://github.com/justinmchase/serializable
deno javascript-library jsr typescript
Last synced: about 2 months ago
JSON representation
Serializable type definitions for TypeScript
- Host: GitHub
- URL: https://github.com/justinmchase/serializable
- Owner: justinmchase
- License: mit
- Created: 2023-04-19T02:36:39.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-16T23:02:44.000Z (over 1 year ago)
- Last Synced: 2026-02-25T22:37:10.852Z (4 months ago)
- Topics: deno, javascript-library, jsr, typescript
- Language: TypeScript
- Homepage: https://jsr.io/@justinmchase/serializable
- Size: 22.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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
}
```