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
- Host: GitHub
- URL: https://github.com/justinmchase/serializable
- Owner: justinmchase
- License: mit
- Created: 2023-04-19T02:36:39.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-16T23:02:44.000Z (5 months ago)
- Last Synced: 2025-03-17T22:44:31.976Z (about 1 month ago)
- Topics: deno, javascript-library, jsr, typescript
- Language: TypeScript
- Homepage: https://jsr.io/@justinmchase/serializable
- Size: 22.5 KB
- Stars: 1
- Watchers: 2
- 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
}
```