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

Method scopes

src/construct.ts:330–340  ·  view source on GitHub ↗

* All parent scopes of this construct. * * @returns a list of parent scopes. The last element in the list will always * be the current construct and the first element will be the root of the * tree.

()

Source from the content-addressed store, hash-verified

328 * tree.
329 */
330 public get scopes(): IConstruct[] {
331 const ret = new Array<IConstruct>();
332
333 let curr: IConstruct | undefined = this.host;
334 while (curr) {
335 ret.unshift(curr);
336 curr = curr.node.scope;
337 }
338
339 return ret;
340 }
341
342 /**
343 * Returns the root of the construct tree.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected