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

Method with

src/construct.ts:493–503  ·  view source on GitHub ↗

* Applies one or more mixins to this construct. * * Mixins are applied in order. The list of constructs is captured at the * start of the call, so constructs added by a mixin will not be visited. * Use multiple `with()` calls if subsequent mixins should apply to added * constructs.

(...mixins: IMixin[])

Source from the content-addressed store, hash-verified

491 * @returns This construct for chaining
492 */
493 public with(...mixins: IMixin[]): IConstruct {
494 const allConstructs = this.findAll();
495 for (const mixin of mixins) {
496 for (const construct of allConstructs) {
497 if (mixin.supports(construct)) {
498 mixin.applyTo(construct);
499 }
500 }
501 }
502 return this.host;
503 };
504
505 /**
506 * Adds a child construct to this node.

Callers

nothing calls this directly

Calls 3

findAllMethod · 0.95
supportsMethod · 0.80
applyToMethod · 0.80

Tested by

no test coverage detected