# DependencyGroup

A set of constructs to be used as a dependable.

This class can be used when a set of constructs which are disjoint in the
construct tree needs to be combined to be used as a single dependable.

Implements: [IDependable](/cdk/api/v2/docs/constructs.IDependable.html)

- Source: [`src/dependency.ts`](https://github.com/aws/constructs/blob/v10.8.1/src/dependency.ts#L24)

## Example

TypeScript:

```ts
import { DependencyGroup } from 'constructs';

const dependencyGroup = new DependencyGroup();
```

Python:

```python
from constructs import DependencyGroup

dependency_group = DependencyGroup()
```

Java:

```java
import software.constructs.DependencyGroup;

DependencyGroup dependencyGroup = new DependencyGroup();
```

C# / .NET:

```csharp
// Install: dotnet add package Constructs
using Constructs;

var dependencyGroup = new DependencyGroup();
```

Golang:

```go
// Install: go get github.com/aws/constructs-go/constructs/v10
import "github.com/aws/constructs-go/constructs/v10"

dependencyGroup := constructs.NewDependencyGroup()
```

## Initializer

TypeScript:

```ts
new DependencyGroup(deps: IDependable)
```

Python:

```python
DependencyGroup(deps: IDependable)
```

Java:

```java
new DependencyGroup(IDependable deps)
```

C# / .NET:

```csharp
new DependencyGroup(IDependable deps)
```

Golang:

```go
NewDependencyGroup(Deps IDependable)
```

## Methods

- `add(...scopes: IDependable[]): void` — Add a construct to the dependency roots.
