@@ -19,6 +19,7 @@ import {
1919 ChainableBinaryOperator ,
2020 ChainableBinaryTypeOperator ,
2121 pausesASequenceOfBinaryOperators ,
22+ pausesASequenceOfBinaryTypeOperators ,
2223} from "./node-inspection" ;
2324import { Scope } from "./Scope" ;
2425
@@ -240,6 +241,7 @@ function nodeCost(
240241 const opSequenceInProgress = mutCtx . precedingOperator ;
241242 const typeOpSequenceInProgress = mutCtx . precedingTypeOperator ;
242243 const pauseOpSequence = pausesASequenceOfBinaryOperators ( node ) ;
244+ const pauseTypeOpSequence = pausesASequenceOfBinaryTypeOperators ( node ) ;
243245
244246 // Check if the node ends any ongoing sequence of binary operators
245247 if ( breaksASequenceOfBinaryOperators ( node ) ) {
@@ -262,6 +264,7 @@ function nodeCost(
262264 mutCtx . precedingTypeOperator = node . kind ;
263265 } else if ( pauseOpSequence ) {
264266 mutCtx . precedingOperator = undefined ;
267+ } else if ( pauseTypeOpSequence ) {
265268 mutCtx . precedingTypeOperator = undefined ;
266269 }
267270
@@ -290,6 +293,7 @@ function nodeCost(
290293 // continue a paused sequence
291294 if ( pauseOpSequence ) {
292295 mutCtx . precedingOperator = opSequenceInProgress ;
296+ } else if ( pauseTypeOpSequence ) {
293297 mutCtx . precedingTypeOperator = typeOpSequenceInProgress ;
294298 }
295299
0 commit comments