* Start a scope. Use this with endScope() to achieve the same functionality * as scope() without the need for a function closure.
(name?: string)
| 1052 | * as scope() without the need for a function closure. |
| 1053 | */ |
| 1054 | startScope(name?: string) { |
| 1055 | const scopeInfo: ScopeState = { |
| 1056 | track: [], |
| 1057 | name: 'unnamed scope', |
| 1058 | id: this.state.nextScopeId++ |
| 1059 | }; |
| 1060 | if (name) { |
| 1061 | scopeInfo.name = name; |
| 1062 | } |
| 1063 | this.state.scopeStack.push(scopeInfo); |
| 1064 | this.state.activeScope = scopeInfo; |
| 1065 | } |
| 1066 | |
| 1067 | /** |
| 1068 | * End a scope. Use this with startScope() to achieve the same functionality |
no test coverage detected