UNPKG

2.07 kBTypeScriptView Raw
1// Type definitions for ag-grid v18.1.2
2// Project: http://www.ag-grid.com/
3// Definitions by: Niall Crosby <https://github.com/ag-grid/>
4import { ILogger } from "../iLogger";
5import { Component } from "../widgets/component";
6export interface ContextParams {
7 seed: any;
8 beans: any[];
9 components: ComponentMeta[];
10 overrideBeans: any[];
11 debug: boolean;
12}
13export interface ComponentMeta {
14 theClass: new () => Object;
15 componentName: string;
16}
17export declare class Context {
18 private beans;
19 private contextParams;
20 private logger;
21 private componentsMappedByName;
22 private destroyed;
23 constructor(params: ContextParams, logger: ILogger);
24 private setupComponents();
25 private addComponent(componentMeta);
26 createComponent(element: Element, afterPreCreateCallback?: (comp: Component) => void): Component;
27 wireBean(bean: any, afterPreCreateCallback?: (comp: Component) => void): void;
28 private wireBeans(beans, afterPreCreateCallback?);
29 private createBeans();
30 private createBeanEntry(Bean);
31 private autoWireBeans(beans);
32 private methodWireBeans(beans);
33 private autoWireBean(bean);
34 private getBeanName(constructor);
35 private methodWireBean(bean);
36 private getBeansForParameters(parameters, beanName);
37 private lookupBeanInstance(wiringBean, beanName, optional?);
38 private postConstruct(beans);
39 private preConstruct(beans);
40 getBean(name: string): any;
41 destroy(): void;
42}
43export declare function PreConstruct(target: Object, methodName: string, descriptor: TypedPropertyDescriptor<any>): void;
44export declare function PostConstruct(target: Object, methodName: string, descriptor: TypedPropertyDescriptor<any>): void;
45export declare function PreDestroy(target: Object, methodName: string, descriptor: TypedPropertyDescriptor<any>): void;
46export declare function Bean(beanName: string): Function;
47export declare function Autowired(name?: string): Function;
48export declare function Optional(name?: string): Function;
49export declare function Qualifier(name: string): Function;