UNPKG

1.13 kBTypeScriptView Raw
1/**
2 * Contains a reference to a component and locator to find it.
3 * It is used by [[References]] to store registered component references.
4 */
5export declare class Reference {
6 private _locator;
7 private _component;
8 /**
9 * Create a new instance of the reference object and assigns its values.
10 *
11 * @param locator a locator to find the reference.
12 * @param reference a reference to component.
13 */
14 constructor(locator: any, component: any);
15 /**
16 * Matches locator to this reference locator.
17 *
18 * Descriptors are matched using equal method.
19 * All other locator types are matched using direct comparison.
20 *
21 * @param locator the locator to match.
22 * @return true if locators are matching and false it they don't.
23 *
24 * @see [[Descriptor]]
25 */
26 match(locator: any): boolean;
27 /**
28 * Gets the stored component reference.
29 *
30 * @return the component's references.
31 */
32 getComponent(): any;
33 /**
34 * Gets the stored component locator.
35 *
36 * @return the component's locator.
37 */
38 getLocator(): any;
39}