* 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)
| 261 | * @returns The context object or an empty object if there is discovered context |
| 262 | */ |
| 263 | public getAllContext(defaults?: object): any { |
| 264 | return this.scopes.reverse() |
| 265 | .reduce((a, s) => ({ ...(s.node._context), ...a }), { ...defaults }); |
| 266 | } |
| 267 | |
| 268 | /** |
| 269 | * Retrieves a value from tree context. |