(target: IAnyStateTreeNode)
| 296 | * ``` |
| 297 | */ |
| 298 | export function unprotect(target: IAnyStateTreeNode): void { |
| 299 | // check all arguments |
| 300 | assertIsStateTreeNode(target, 1) |
| 301 | |
| 302 | const node = getStateTreeNode(target) |
| 303 | if (!node.isRoot) throw new MstError("`unprotect` can only be invoked on root nodes") |
| 304 | node.isProtectionEnabled = false |
| 305 | } |
| 306 | |
| 307 | /** |
| 308 | * Returns true if the object is in protected mode, @see protect |
searching dependent graphs…