From 1e9e82525f1bf99c9ca37b115039c49b26a73c45 Mon Sep 17 00:00:00 2001 From: James Wyatt Cready-Pyle Date: Thu, 7 Dec 2023 08:43:12 -0500 Subject: [PATCH] Fix `messagePrototype` for `exactOptionalProperties: true` (#615) --- packages/runtime/src/message-type-contract.ts | 2 +- packages/runtime/src/message-type.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/runtime/src/message-type-contract.ts b/packages/runtime/src/message-type-contract.ts index ad4d79a1..e9b3587f 100644 --- a/packages/runtime/src/message-type-contract.ts +++ b/packages/runtime/src/message-type-contract.ts @@ -62,7 +62,7 @@ export interface IMessageType extends MessageInfo { * Contains the prototype for messages returned by create() which * includes the `MESSAGE_TYPE` symbol pointing back to `this`. */ - readonly messagePrototype?: Readonly<{}>; + readonly messagePrototype?: Readonly<{}> | undefined; /** diff --git a/packages/runtime/src/message-type.ts b/packages/runtime/src/message-type.ts index b0c0b203..2c4d58f5 100644 --- a/packages/runtime/src/message-type.ts +++ b/packages/runtime/src/message-type.ts @@ -54,7 +54,7 @@ export class MessageType implements IMessageType { * Contains the prototype for messages returned by create() which * includes the `MESSAGE_TYPE` symbol pointing back to `this`. */ - readonly messagePrototype: Readonly<{}> | undefined; + readonly messagePrototype?: Readonly<{}> | undefined; protected readonly defaultCheckDepth = 16; protected readonly refTypeCheck: ReflectionTypeCheck;