* Retrieves the all context of a node from tree context. * * Context is usually initialized at the root, but can be overridden at any point in the tree. * * @param defaults Any keys to override the retrieved context * @returns The context object or an empty object if there is discover
(defaults?: object)
| 287 | * @returns The context object or an empty object if there is discovered context |
| 288 | */ |
| 289 | public getAllContext(defaults?: object): any { |
| 290 | const ret = { ...defaults }; |
| 291 | for (const scope of this._scopes) { |
| 292 | Object.assign(ret, scope.node._context); |
| 293 | } |
| 294 | return ret; |
| 295 | } |
| 296 | |
| 297 | /** |
| 298 | * Retrieves a value from tree context. |