constructs.Dependable

class Dependable 🔹

LanguageType name
.NETConstructs.Dependable
Javasoftware.constructs.Dependable
Pythonconstructs.Dependable
TypeScript (source)constructs » 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.

Example

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

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

Initializer

new Dependable()

Properties

NameTypeDescription
dependencyRoots🔹IConstruct[]The set of constructs that form the root of this dependable.

dependencyRoots🔹

Type: IConstruct[]

The set of constructs that form the root of this dependable.

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

Methods

NameDescription
static get(instance)⚠️Return the matching Dependable for the given class instance.
static implement(instance, trait)🔹Turn any object into an IDependable.
static of(instance)🔹Return the matching Dependable for the given class instance.

static get(instance)⚠️

public static get(instance: IDependable): Dependable

⚠️ Deprecated: use of

Parameters

  • instance IDependable

Returns

  • Dependable

Return the matching Dependable for the given class instance.


static implement(instance, trait)🔹

public static implement(instance: IDependable, trait: Dependable): void

Parameters

  • instance IDependable
  • trait Dependable

Turn any object into an IDependable.


static of(instance)🔹

public static of(instance: IDependable): Dependable

Parameters

  • instance IDependable

Returns

  • Dependable

Return the matching Dependable for the given class instance.