From bcd26f3895a172aaad51b405f78f60fc988b3f2e Mon Sep 17 00:00:00 2001 From: Neal Beeken Date: Tue, 10 Sep 2024 14:32:15 -0400 Subject: [PATCH] fix: daria suggestion Co-authored-by: Daria Pardue --- docs/upgrade-to-v5.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/upgrade-to-v5.md b/docs/upgrade-to-v5.md index 5bcf68a9..1ec6ee3c 100644 --- a/docs/upgrade-to-v5.md +++ b/docs/upgrade-to-v5.md @@ -322,7 +322,7 @@ export type JSONPrimitive = string | number | boolean | null; export type SerializableTypes = Document | Array | JSONPrimitive; ``` -`SerializableTypes` is removed in v5 due to it inaccuracy and inconvenience when working with return type of `EJSON.parse()`. +`SerializableTypes` is removed in v5 due to its inaccuracy and inconvenience when working with return type of `EJSON.parse()`. This type does not contain all possible outputs from this function and it cannot be conveniently related to a custom declared type. `EJSON.parse` and `EJSON.stringify` now accept `any` in alignment with `JSON`'s corresponding APIs. For users that desire type strictness it is recommended to wrap these APIs with type annotations that take/return `unknown` since that generally forces better narrowing logic than `SerializableTypes` would have prompted.