From 451949df141b982163e414d38d8d0b3db04dca03 Mon Sep 17 00:00:00 2001 From: Orlando Date: Mon, 4 Mar 2024 11:07:16 +0000 Subject: [PATCH] Serialized --- CHANGELOG.md | 6 ++++++ package.json | 2 +- src/types/Serialized.ts | 7 +++++++ src/types/index.ts | 1 + 4 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 src/types/Serialized.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 213cdf8..3876bc9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # deverything +## 0.46.1 + +### Patch Changes + +- serialized + ## 0.46.0 ### Minor Changes diff --git a/package.json b/package.json index dd5dc7b..8368f49 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/types/Serialized.ts b/src/types/Serialized.ts new file mode 100644 index 0000000..d56b311 --- /dev/null +++ b/src/types/Serialized.ts @@ -0,0 +1,7 @@ +export type Serialized = T extends Date + ? string + : T extends Array + ? Array> + : T extends object + ? { [K in keyof T]: Serialized } + : T; diff --git a/src/types/index.ts b/src/types/index.ts index 537171c..98f187b 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -9,4 +9,5 @@ export * from "./Object"; export * from "./PlainObject"; export * from "./Point"; export * from "./PrismaSelect"; +export * from "./Serialized"; export * from "./WithDatey";