# Dependable

Trait for IDependable.

Traits are interfaces that are privately implemented by objects. Instead of
showing up in the public interface of a class, they need to be queried
explicitly. This is used to implement certain framework features that are
not intended to be used by Construct consumers, and so should be hidden
from accidental use.

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

## Example

```ts
// Usage
const roots = Dependable.of(construct).dependencyRoots;

// Definition
Dependable.implement(construct, {
      dependencyRoots: [construct],
});
```

## Initializer

```ts
new Dependable()
```

## Properties

- `dependencyRoots`: [IConstruct](/cdk/api/v2/docs/constructs.IConstruct.html)[] — The set of constructs that form the root of this dependable.

  All resources under all returned constructs are included in the ordering
  dependency.

## Methods

- `get(instance: IDependable): Dependable // chainable` (static) — use `of`

- `implement(instance: IDependable, trait: Dependable): void` (static) — Turn any object into an IDependable.

- `of(instance: IDependable): Dependable // chainable` (static) — Return the matching Dependable for the given class instance.
