File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,11 @@ const START_CONFLICT_TYPES: TriggerType[] = [
6161
6262type BlockWithType = { type : string ; subBlocks ?: Record < string , unknown > | undefined }
6363
64+ type BlockWithMetadata = BlockWithType & {
65+ category ?: string
66+ triggers ?: { enabled ?: boolean }
67+ }
68+
6469export interface StartBlockCandidate < T extends BlockWithType > {
6570 blockId : string
6671 block : T
@@ -101,8 +106,9 @@ export function classifyStartBlockType(
101106}
102107
103108export function classifyStartBlock < T extends BlockWithType > ( block : T ) : StartBlockPath | null {
104- const category = ( block as any ) ?. category as string | undefined
105- const triggerModeEnabled = Boolean ( ( block as any ) ?. triggers ?. enabled )
109+ const blockWithMetadata = block as BlockWithMetadata
110+ const category = blockWithMetadata . category
111+ const triggerModeEnabled = Boolean ( blockWithMetadata . triggers ?. enabled )
106112 return classifyStartBlockType ( block . type , { category, triggerModeEnabled } )
107113}
108114
You can’t perform that action at this time.
0 commit comments