UNPKG

2.59 kBTypeScriptView Raw
1import * as d from './declarations';
2export { ComponentDidLoad, ComponentDidUnload, ComponentDidUpdate, ComponentWillLoad, ComponentWillUpdate, ComponentInterface, StencilConfig as Config, EventEmitter, FunctionalComponent, QueueApi, JSX } from './declarations';
3/**
4 * Build
5 */
6export declare const Build: d.UserBuildConditionals;
7/**
8 * Component
9 */
10export declare const Component: d.ComponentDecorator;
11/**
12 * Element
13 */
14export declare const Element: d.ElementDecorator;
15/**
16 * Event
17 */
18export declare const Event: d.EventDecorator;
19/**
20 * Listen
21 */
22export declare const Listen: d.ListenDecorator;
23/**
24 * Method
25 */
26export declare const Method: d.MethodDecorator;
27/**
28 * Prop
29 */
30export declare const Prop: d.PropDecorator;
31/**
32 * State
33 */
34export declare const State: d.StateDecorator;
35/**
36 * Watch
37 */
38export declare const Watch: d.WatchDecorator;
39/**
40 * setMode
41 */
42export declare const setMode: (handler: ((elm: HTMLElement) => string | undefined | null)) => void;
43/**
44 * getMode
45 */
46export declare function getMode<T = (string | undefined)>(ref: any): T;
47/**
48 * getAssetPath
49 */
50export declare function getAssetPath(path: string): string;
51/**
52 * getElement
53 */
54export declare function getElement(ref: any): d.HTMLStencilElement;
55/**
56 * writeTask
57 */
58export declare function writeTask(task: d.RafCallback): void;
59/**
60 * readTask
61 */
62export declare function readTask(task: d.RafCallback): void;
63/**
64 * Host
65 */
66interface HostAttributes {
67 class?: string | {
68 [className: string]: boolean;
69 };
70 style?: {
71 [key: string]: string | undefined;
72 };
73 ref?: (el: HTMLElement | null) => void;
74 [prop: string]: any;
75}
76export declare const Host: d.FunctionalComponent<HostAttributes>;
77/**
78 * The "h" namespace is used to import JSX types for elements and attributes.
79 * It is imported in order to avoid conflicting global JSX issues.
80 */
81export declare namespace h {
82 function h(sel: any): d.VNode;
83 function h(sel: Node, data: d.VNodeData): d.VNode;
84 function h(sel: any, data: d.VNodeData): d.VNode;
85 function h(sel: any, text: string): d.VNode;
86 function h(sel: any, children: Array<d.VNode | undefined | null>): d.VNode;
87 function h(sel: any, data: d.VNodeData, text: string): d.VNode;
88 function h(sel: any, data: d.VNodeData, children: Array<d.VNode | undefined | null>): d.VNode;
89 function h(sel: any, data: d.VNodeData, children: d.VNode): d.VNode;
90 namespace JSX {
91 interface IntrinsicElements extends d.JSX.IntrinsicElements, d.JSXBase.IntrinsicElements {
92 [tagName: string]: any;
93 }
94 }
95}