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

Method with

src/construct.ts:480–490  ·  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

478 * @returns This construct for chaining
479 */
480 public with(...mixins: IMixin[]): IConstruct {
481 const allConstructs = this.findAll();
482 for (const mixin of mixins) {
483 for (const construct of allConstructs) {
484 if (mixin.supports(construct)) {
485 mixin.applyTo(construct);
486 }
487 }
488 }
489 return this.host;
490 };
491
492 /**
493 * 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