UNPKG

@stencil/core

Version:

A Compiler for Web Components and Progressive Web Apps

61 lines (60 loc) 1.98 kB
import * as d from '.'; export interface ComponentConstructor { is?: string; properties?: ComponentConstructorProperties; watchers?: ComponentConstructorWatchers; events?: ComponentConstructorEvent[]; listeners?: ComponentConstructorListener[]; style?: string; styleId?: string; encapsulation?: ComponentConstructorEncapsulation; observedAttributes?: string[]; cmpMeta?: d.ComponentRuntimeMeta; isProxied?: boolean; isStyleRegistered?: boolean; } export interface ComponentConstructorWatchers { [propName: string]: string[]; } export interface ComponentTestingConstructor extends ComponentConstructor { COMPILER_META: d.ComponentCompilerMeta; prototype?: { componentWillLoad?: Function; componentWillUpdate?: Function; componentWillRender?: Function; __componentWillLoad?: Function; __componentWillUpdate?: Function; __componentWillRender?: Function; }; } export interface ComponentNativeConstructor extends ComponentConstructor { cmpMeta: d.ComponentRuntimeMeta; } export declare type ComponentConstructorEncapsulation = 'shadow' | 'scoped' | 'none'; export interface ComponentConstructorProperties { [propName: string]: ComponentConstructorProperty; } export interface ComponentConstructorProperty { attribute?: string; elementRef?: boolean; method?: boolean; mutable?: boolean; reflect?: boolean; state?: boolean; type?: ComponentConstructorPropertyType; watchCallbacks?: string[]; } export declare type ComponentConstructorPropertyType = StringConstructor | BooleanConstructor | NumberConstructor | 'string' | 'boolean' | 'number'; export interface ComponentConstructorEvent { name: string; method: string; bubbles: boolean; cancelable: boolean; composed: boolean; } export interface ComponentConstructorListener { name: string; method: string; capture?: boolean; passive?: boolean; }