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