* Return the top-most block in this block's tree. * This will return itself if this block is at the top level. * * @returns The root block.
()
| 658 | * @returns The root block. |
| 659 | */ |
| 660 | getRootBlock(): this { |
| 661 | let rootBlock: this; |
| 662 | /* eslint-disable-next-line @typescript-eslint/no-this-alias */ |
| 663 | let block: this | null = this; |
| 664 | do { |
| 665 | rootBlock = block; |
| 666 | block = rootBlock.parentBlock_; |
| 667 | } while (block); |
| 668 | return rootBlock; |
| 669 | } |
| 670 | |
| 671 | /** |
| 672 | * Walk up from the given block up through the stack of blocks to find |
no outgoing calls
no test coverage detected