1 | import { IConstruct } from './construct';
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 | export interface IDependable {
|
14 | }
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 | export declare class DependencyGroup implements IDependable {
|
22 | private readonly _deps;
|
23 | constructor(...deps: IDependable[]);
|
24 | /**
|
25 | * Add a construct to the dependency roots
|
26 | */
|
27 | add(...scopes: IDependable[]): void;
|
28 | }
|
29 | /**
|
30 | * Trait for IDependable
|
31 | *
|
32 | * Traits are interfaces that are privately implemented by objects. Instead of
|
33 | * showing up in the public interface of a class, they need to be queried
|
34 | * explicitly. This is used to implement certain framework features that are
|
35 | * not intended to be used by Construct consumers, and so should be hidden
|
36 | * from accidental use.
|
37 | *
|
38 | * @example
|
39 | *
|
40 | * // Usage
|
41 | * const roots = Dependable.of(construct).dependencyRoots;
|
42 | *
|
43 | * // Definition
|
44 | * Dependable.implement(construct, {
|
45 | * dependencyRoots: [construct],
|
46 | * });
|
47 | */
|
48 | export declare abstract class Dependable {
|
49 | |
50 |
|
51 |
|
52 | static implement(instance: IDependable, trait: Dependable): void;
|
53 | |
54 |
|
55 |
|
56 | static of(instance: IDependable): Dependable;
|
57 | |
58 |
|
59 |
|
60 |
|
61 | static get(instance: IDependable): Dependable;
|
62 | |
63 |
|
64 |
|
65 |
|
66 |
|
67 |
|
68 | abstract readonly dependencyRoots: IConstruct[];
|
69 | }
|