try Bypass Hooks
Attempts to bypass hooks on a MutableList if it is an instance of DslMutableList.
This function allows executing a block of code on the list without triggering any hooks defined in the DslMutableList. If the list is not a DslMutableList, the failed callback is executed.
Note: Using this function could not avoid triggering the hooks of accessing the list, so it should be used with caution. It is recommended to use this only when you are sure that the list is a DslMutableList.
Return
The result of the block execution if successful, or null if the list is not a DslMutableList.
Parameters
The type of elements in the list.
The return type of the block to be executed.
A callback function to be executed if the list is not a DslMutableList. Defaults to an empty function.
The block of code to execute on the list, bypassing hooks.