From edb722df37592044d8d7b9f0fd377156539e73aa Mon Sep 17 00:00:00 2001 From: Tim Date: Tue, 16 Jan 2024 11:24:09 +1300 Subject: [PATCH] allow undefined in rpc schemas (#1924) --- .changeset/selfish-pets-breathe.md | 5 +++++ packages/rpc/src/internal/schema.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/selfish-pets-breathe.md diff --git a/.changeset/selfish-pets-breathe.md b/.changeset/selfish-pets-breathe.md new file mode 100644 index 00000000000..c286e7be0e3 --- /dev/null +++ b/.changeset/selfish-pets-breathe.md @@ -0,0 +1,5 @@ +--- +"@effect/rpc": patch +--- + +allow undefined in rpc schemas diff --git a/packages/rpc/src/internal/schema.ts b/packages/rpc/src/internal/schema.ts index 89a0c18005c..4ed6ecf30c9 100644 --- a/packages/rpc/src/internal/schema.ts +++ b/packages/rpc/src/internal/schema.ts @@ -10,7 +10,7 @@ import * as Codec from "./codec.js" type JsonArray = ReadonlyArray type JsonObject = { readonly [key: string]: Json } -export type Json = null | boolean | number | string | JsonArray | JsonObject +export type Json = undefined | null | boolean | number | string | JsonArray | JsonObject /** @internal */ export const RpcServiceId: schema.RpcServiceId = Symbol.for(