Skip to content

Commit

Permalink
docs(aws-cdk-lib): update README to reference DependencyGroup instead… (
Browse files Browse the repository at this point in the history
aws#19520)

… of ConcreteDependable

Closes aws#19352 

----


*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
madeline-k authored and josephedward committed Aug 30, 2022
1 parent 935f85a commit 650316f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/@aws-cdk/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,13 +345,13 @@ relationship between all resources in the scope of `constructA` and all
resources in the scope of `constructB`.

If you want a single object to represent a set of constructs that are not
necessarily in the same scope, you can use a `ConcreteDependable`. The
necessarily in the same scope, you can use a `DependencyGroup`. The
following creates a single object that represents a dependency on two
constructs, `constructB` and `constructC`:

```ts
// Declare the dependable object
const bAndC = new ConcreteDependable();
const bAndC = new DependencyGroup();
bAndC.add(constructB);
bAndC.add(constructC);

Expand Down
6 changes: 4 additions & 2 deletions packages/@aws-cdk/core/rosetta/default.ts-fixture
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ import {
CfnParameter,
CfnResource,
CfnResourceProps,
ConcreteDependable,
Construct,
CustomResource,
CustomResourceProvider,
CustomResourceProviderRuntime,
Expand All @@ -36,6 +34,10 @@ import {
Stage,
Token,
} from '@aws-cdk/core';
import {
Construct,
DependencyGroup,
} from 'constructs';

declare const app: App;
declare const arn: 'arn:partition:service:region:account-id:resource-id';
Expand Down
4 changes: 2 additions & 2 deletions packages/aws-cdk-lib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -376,13 +376,13 @@ relationship between all resources in the scope of `constructA` and all
resources in the scope of `constructB`.

If you want a single object to represent a set of constructs that are not
necessarily in the same scope, you can use a `ConcreteDependable`. The
necessarily in the same scope, you can use a `DependencyGroup`. The
following creates a single object that represents a dependency on two
constructs, `constructB` and `constructC`:

```ts
// Declare the dependable object
const bAndC = new ConcreteDependable();
const bAndC = new DependencyGroup();
bAndC.add(constructB);
bAndC.add(constructC);

Expand Down

0 comments on commit 650316f

Please sign in to comment.