import { HTMLStencilElement } from '../stencil-public-runtime';
export declare const nop: () => void;
export interface ComponentPrototype {
el: HTMLStencilElement;
componentWillLoad?: (...args: any[]) => Promise | void;
componentDidLoad?: (...args: any[]) => Promise | void;
disconnectedCallback?: (...args: any[]) => Promise | void;
}
export declare type ComponentDecorator = (prototype: ComponentPrototype, propertyKey: K) => any;
/**
* Hooks one of the lifecycle methods of a Stencil component.
*
* The original lifecycle method is wrapped and called *after* the supplied hook function.
*/
export declare function hookComponent>(prototype: ComponentPrototype, lifecycleMethod: K, hookFn: (...args: any[]) => Promise | void): void;
/**
* Helper to get injected Stencil @Element. Throws an exception if the injected host element is not defined.
*/
export declare function getEl(obj: any): HTMLStencilElement;
export interface AncestorElementOptions {
optional?: boolean;
tagName?: string;
supportAttr?: boolean;
}
/**
* Decorator to inject an ancestor element of specified type. The tag name of the ancestor can be specified
* as an argument (e.g. 'flow-context') or, if omitted, the decorated property name will be used
* (converted to kebab case). Note that the decorator works by hooking 'componentDidLoad'
* so the injected ancestor will be null until the componentDidLoad lifecycle event has been fired.
*
* if `allowParentAttr` is true then the ancestor element can be specified directly using an attribute. This
* allows an ancestor to be 'linked' rather than relying on DOM hierarchy.
*
* e.g.
* // By hierarchy:
*
*
* // By 'link'
*
*
*
* @param tagName tag name of ancestor to inject
* @param allowParentAttr
*/
export declare function AncestorElement(options?: AncestorElementOptions): (prototype: ComponentPrototype, propertyName: string) => void;