@@ -4,13 +4,13 @@ import { makeProtoEnumConverters as makeProtoEnumConverters } from '@temporalio/
44
55// ASSERTION: There MUST be a corresponding `KEY: 'KEY'` in the const object of strings enum (must be present)
66{
7- type ParentClosePolicyMissingEntry =
8- ( typeof ParentClosePolicyMissingEntry ) [ keyof typeof ParentClosePolicyMissingEntry ] ;
97 const ParentClosePolicyMissingEntry = {
108 TERMINATE : 'TERMINATE' ,
119 // ABANDON: 'ABANDON', // Missing entry!
1210 REQUEST_CANCEL : 'REQUEST_CANCEL' ,
1311 } as const ;
12+ type ParentClosePolicyMissingEntry =
13+ ( typeof ParentClosePolicyMissingEntry ) [ keyof typeof ParentClosePolicyMissingEntry ] ;
1414
1515 makeProtoEnumConverters <
1616 coresdk . child_workflow . ParentClosePolicy ,
@@ -30,13 +30,13 @@ import { makeProtoEnumConverters as makeProtoEnumConverters } from '@temporalio/
3030
3131// ASSERTION: There MUST be a corresponding `KEY: 'KEY'` in the const object of strings enum (must have correct value)
3232{
33- type ParentClosePolicyIncorectEntry =
34- ( typeof ParentClosePolicyIncorectEntry ) [ keyof typeof ParentClosePolicyIncorectEntry ] ;
3533 const ParentClosePolicyIncorectEntry = {
3634 TERMINATE : 'TERMINATE' ,
3735 ABANDON : 'INCORRECT' , // Incorrect entry!
3836 REQUEST_CANCEL : 'REQUEST_CANCEL' ,
3937 } as const ;
38+ type ParentClosePolicyIncorectEntry =
39+ ( typeof ParentClosePolicyIncorectEntry ) [ keyof typeof ParentClosePolicyIncorectEntry ] ;
4040
4141 makeProtoEnumConverters <
4242 coresdk . child_workflow . ParentClosePolicy ,
@@ -57,8 +57,6 @@ import { makeProtoEnumConverters as makeProtoEnumConverters } from '@temporalio/
5757
5858// ASSERTION: There MAY be a corresponding `PREFIX_KEY: 'KEY'` in the const object of strings enum (may be present)
5959{
60- type ParentClosePolicyWithPrefixedEntries =
61- ( typeof ParentClosePolicyWithPrefixedEntries ) [ keyof typeof ParentClosePolicyWithPrefixedEntries ] ;
6260 const ParentClosePolicyWithPrefixedEntries = {
6361 TERMINATE : 'TERMINATE' ,
6462 ABANDON : 'ABANDON' ,
@@ -68,6 +66,8 @@ import { makeProtoEnumConverters as makeProtoEnumConverters } from '@temporalio/
6866 PARENT_CLOSE_POLICY_ABANDON : 'ABANDON' ,
6967 PARENT_CLOSE_POLICY_REQUEST_CANCEL : 'REQUEST_CANCEL' ,
7068 } as const ;
69+ type ParentClosePolicyWithPrefixedEntries =
70+ ( typeof ParentClosePolicyWithPrefixedEntries ) [ keyof typeof ParentClosePolicyWithPrefixedEntries ] ;
7171
7272 makeProtoEnumConverters <
7373 coresdk . child_workflow . ParentClosePolicy ,
@@ -88,13 +88,13 @@ import { makeProtoEnumConverters as makeProtoEnumConverters } from '@temporalio/
8888
8989// ASSERTION: There MAY be a corresponding `PREFIX_KEY: 'KEY'` in the const object of strings enum (may not be present)
9090{
91- type ParentClosePolicyWithoutPrefixedEntries =
92- ( typeof ParentClosePolicyWithoutPrefixedEntries ) [ keyof typeof ParentClosePolicyWithoutPrefixedEntries ] ;
9391 const ParentClosePolicyWithoutPrefixedEntries = {
9492 TERMINATE : 'TERMINATE' ,
9593 ABANDON : 'ABANDON' ,
9694 REQUEST_CANCEL : 'REQUEST_CANCEL' ,
9795 } as const ;
96+ type ParentClosePolicyWithoutPrefixedEntries =
97+ ( typeof ParentClosePolicyWithoutPrefixedEntries ) [ keyof typeof ParentClosePolicyWithoutPrefixedEntries ] ;
9898
9999 makeProtoEnumConverters <
100100 coresdk . child_workflow . ParentClosePolicy ,
@@ -115,8 +115,6 @@ import { makeProtoEnumConverters as makeProtoEnumConverters } from '@temporalio/
115115
116116// ASSERTION: There MAY be a corresponding `PREFIX_KEY: 'KEY'` in the const object of strings enum (if present, must have correct value)
117117{
118- type ParentClosePolicyWithPrefixedEntries =
119- ( typeof ParentClosePolicyWithPrefixedEntries ) [ keyof typeof ParentClosePolicyWithPrefixedEntries ] ;
120118 const ParentClosePolicyWithPrefixedEntries = {
121119 TERMINATE : 'TERMINATE' ,
122120 ABANDON : 'ABANDON' ,
@@ -126,6 +124,8 @@ import { makeProtoEnumConverters as makeProtoEnumConverters } from '@temporalio/
126124 PARENT_CLOSE_POLICY_ABANDON : 'ABANDON' ,
127125 PARENT_CLOSE_POLICY_REQUEST_CANCEL : 'INCORRECT' , // Incorrect entry!
128126 } as const ;
127+ type ParentClosePolicyWithPrefixedEntries =
128+ ( typeof ParentClosePolicyWithPrefixedEntries ) [ keyof typeof ParentClosePolicyWithPrefixedEntries ] ;
129129
130130 makeProtoEnumConverters <
131131 coresdk . child_workflow . ParentClosePolicy ,
@@ -146,7 +146,6 @@ import { makeProtoEnumConverters as makeProtoEnumConverters } from '@temporalio/
146146}
147147
148148{
149- type ParentClosePolicy = ( typeof ParentClosePolicy ) [ keyof typeof ParentClosePolicy ] ;
150149 const ParentClosePolicy = {
151150 TERMINATE : 'TERMINATE' ,
152151 ABANDON : 'ABANDON' ,
@@ -157,6 +156,7 @@ import { makeProtoEnumConverters as makeProtoEnumConverters } from '@temporalio/
157156 PARENT_CLOSE_POLICY_ABANDON : 'ABANDON' ,
158157 PARENT_CLOSE_POLICY_REQUEST_CANCEL : 'REQUEST_CANCEL' ,
159158 } as const ;
159+ type ParentClosePolicy = ( typeof ParentClosePolicy ) [ keyof typeof ParentClosePolicy ] ;
160160
161161 // ASSERTION: There MUST be a corresponding `KEY: number` in the mapping table (must be there)
162162 makeProtoEnumConverters <
@@ -300,13 +300,13 @@ import { makeProtoEnumConverters as makeProtoEnumConverters } from '@temporalio/
300300
301301// ASSERTION: The const object of strings enum MUST NOT contain any other keys than the ones mandated or optionally allowed above.
302302{
303- type ParentClosePolicyWithExtra = ( typeof ParentClosePolicyWithExtra ) [ keyof typeof ParentClosePolicyWithExtra ] ;
304303 const ParentClosePolicyWithExtra = {
305304 TERMINATE : 'TERMINATE' ,
306305 ABANDON : 'ABANDON' ,
307306 REQUEST_CANCEL : 'REQUEST_CANCEL' ,
308307 EXTRA : 'EXTRA' , // Extra entry!
309308 } as const ;
309+ type ParentClosePolicyWithExtra = ( typeof ParentClosePolicyWithExtra ) [ keyof typeof ParentClosePolicyWithExtra ] ;
310310
311311 makeProtoEnumConverters <
312312 coresdk . child_workflow . ParentClosePolicy ,
@@ -327,7 +327,6 @@ import { makeProtoEnumConverters as makeProtoEnumConverters } from '@temporalio/
327327}
328328
329329{
330- type ParentClosePolicy = ( typeof ParentClosePolicy ) [ keyof typeof ParentClosePolicy ] ;
331330 const ParentClosePolicy = {
332331 TERMINATE : 'TERMINATE' ,
333332 ABANDON : 'ABANDON' ,
@@ -338,6 +337,7 @@ import { makeProtoEnumConverters as makeProtoEnumConverters } from '@temporalio/
338337 PARENT_CLOSE_POLICY_ABANDON : 'ABANDON' ,
339338 PARENT_CLOSE_POLICY_REQUEST_CANCEL : 'REQUEST_CANCEL' ,
340339 } as const ;
340+ type ParentClosePolicy = ( typeof ParentClosePolicy ) [ keyof typeof ParentClosePolicy ] ;
341341
342342 // ASSERTION: The mapping table MUST NOT contain any other keys than the ones mandated above
343343 makeProtoEnumConverters <
@@ -416,7 +416,6 @@ import { makeProtoEnumConverters as makeProtoEnumConverters } from '@temporalio/
416416
417417// Functionnal tests
418418{
419- type ParentClosePolicy = ( typeof ParentClosePolicy ) [ keyof typeof ParentClosePolicy ] ;
420419 const ParentClosePolicy = {
421420 TERMINATE : 'TERMINATE' ,
422421 ABANDON : 'ABANDON' ,
@@ -427,6 +426,7 @@ import { makeProtoEnumConverters as makeProtoEnumConverters } from '@temporalio/
427426 PARENT_CLOSE_POLICY_ABANDON : 'ABANDON' ,
428427 PARENT_CLOSE_POLICY_REQUEST_CANCEL : 'REQUEST_CANCEL' ,
429428 } as const ;
429+ type ParentClosePolicy = ( typeof ParentClosePolicy ) [ keyof typeof ParentClosePolicy ] ;
430430
431431 const [ encodeParentClosePolicy , decodeParentClosePolicy ] = //
432432 makeProtoEnumConverters <
0 commit comments