MCPcopy Create free account
hub / github.com/aws/constructs / getAllContext

Method getAllContext

src/construct.ts:263–266  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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.

Callers 1

construct.test.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected