Skip to content

Commit

Permalink
Serialized
Browse files Browse the repository at this point in the history
  • Loading branch information
ogroppo committed Mar 4, 2024
1 parent d1f67cc commit 451949d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# deverything

## 0.46.1

### Patch Changes

- serialized

## 0.46.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "deverything",
"version": "0.46.0",
"version": "0.46.1",
"description": "Everything you need for Dev",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
Expand Down
7 changes: 7 additions & 0 deletions src/types/Serialized.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export type Serialized<T> = T extends Date
? string
: T extends Array<infer R>
? Array<Serialized<R>>
: T extends object
? { [K in keyof T]: Serialized<T[K]> }
: T;
1 change: 1 addition & 0 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ export * from "./Object";
export * from "./PlainObject";
export * from "./Point";
export * from "./PrismaSelect";
export * from "./Serialized";
export * from "./WithDatey";

0 comments on commit 451949d

Please sign in to comment.