From 1f3faa679bff268a5dfd3688be26200ebf86c7ba Mon Sep 17 00:00:00 2001 From: Timo Stamm Date: Tue, 21 Nov 2023 17:23:03 +0100 Subject: [PATCH] Fix Edition type modification for the edition property of DescFile (#626) --- packages/protobuf/src/create-descriptor-set.ts | 2 +- packages/protobuf/src/descriptor-set.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/protobuf/src/create-descriptor-set.ts b/packages/protobuf/src/create-descriptor-set.ts index d9aebb9a3..84f9ff63b 100644 --- a/packages/protobuf/src/create-descriptor-set.ts +++ b/packages/protobuf/src/create-descriptor-set.ts @@ -640,7 +640,7 @@ function parseFileSyntax( syntax: string | undefined, edition: Edition | undefined, ) { - let e: Omit< + let e: Exclude< Edition, | Edition.EDITION_1_TEST_ONLY | Edition.EDITION_2_TEST_ONLY diff --git a/packages/protobuf/src/descriptor-set.ts b/packages/protobuf/src/descriptor-set.ts index 28a54c459..9cc1ab8c3 100644 --- a/packages/protobuf/src/descriptor-set.ts +++ b/packages/protobuf/src/descriptor-set.ts @@ -91,7 +91,7 @@ export interface DescFile { * The edition of the protobuf file. Will be EDITION_PROTO2 for syntax="proto2", * EDITION_PROTO3 for syntax="proto3"; */ - readonly edition: Omit< + readonly edition: Exclude< Edition, | Edition.EDITION_1_TEST_ONLY | Edition.EDITION_2_TEST_ONLY