Skip to content

Commit b94a525

Browse files
chore: Renamed 'DependableTrait' to new name 'Dependable' (#1087)
It looks like the former Name of 'Dependable' was 'DependableTrait'. Latter name is mentioned in the code documentation, which doesn't fit to the code anymore. I updated the docs regarding the current code. Fixes #1093
1 parent f8edef8 commit b94a525

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

API.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ __Implemented by__: [Construct](#constructs-construct), [DependencyGroup](#const
470470
Trait marker for classes that can be depended upon.
471471

472472
The presence of this interface indicates that an object has
473-
an `IDependableTrait` implementation.
473+
an `IDependable` implementation.
474474

475475
This interface can be used to take an (ordering) dependency on a set of
476476
constructs. An ordering dependency implies that the resources represented by

src/dependency.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { IConstruct } from './construct';
44
* Trait marker for classes that can be depended upon
55
*
66
* The presence of this interface indicates that an object has
7-
* an `IDependableTrait` implementation.
7+
* an `IDependable` implementation.
88
*
99
* This interface can be used to take an (ordering) dependency on a set of
1010
* constructs. An ordering dependency implies that the resources represented by
@@ -64,11 +64,11 @@ const DEPENDABLE_SYMBOL = Symbol.for('@aws-cdk/core.DependableTrait');
6464
* @example
6565
*
6666
* // Usage
67-
* const roots = DependableTrait.get(construct).dependencyRoots;
67+
* const roots = Dependable.of(construct).dependencyRoots;
6868
*
6969
* // Definition
70-
* DependableTrait.implement(construct, {
71-
* get dependencyRoots() { return []; }
70+
* Dependable.implement(construct, {
71+
* dependencyRoots: [construct],
7272
* });
7373
*
7474
* @experimental

0 commit comments

Comments
 (0)