diff --git a/API.md b/API.md index dc95fe5c..cf03ac23 100644 --- a/API.md +++ b/API.md @@ -470,7 +470,7 @@ __Implemented by__: [Construct](#constructs-construct), [DependencyGroup](#const Trait marker for classes that can be depended upon. The presence of this interface indicates that an object has -an `IDependableTrait` implementation. +an `IDependable` implementation. This interface can be used to take an (ordering) dependency on a set of constructs. An ordering dependency implies that the resources represented by diff --git a/src/dependency.ts b/src/dependency.ts index 0c30431d..93c6b8fb 100644 --- a/src/dependency.ts +++ b/src/dependency.ts @@ -4,7 +4,7 @@ import { IConstruct } from './construct'; * Trait marker for classes that can be depended upon * * The presence of this interface indicates that an object has - * an `IDependableTrait` implementation. + * an `IDependable` implementation. * * This interface can be used to take an (ordering) dependency on a set of * constructs. An ordering dependency implies that the resources represented by @@ -64,11 +64,11 @@ const DEPENDABLE_SYMBOL = Symbol.for('@aws-cdk/core.DependableTrait'); * @example * * // Usage - * const roots = DependableTrait.get(construct).dependencyRoots; + * const roots = Dependable.of(construct).dependencyRoots; * * // Definition - * DependableTrait.implement(construct, { - * get dependencyRoots() { return []; } + * Dependable.implement(construct, { + * dependencyRoots: [construct], * }); * * @experimental