import { ITemplateResult, IComponentLifeCycle, ComponentProp, Constructor } from './type'; export interface ComplexAttributeConverter { /** * Function called to convert an attribute value to a property * value. */ fromAttribute?(value: string, type?: TypeHint): Type; /** * Function called to convert a property value to an attribute * value. */ toAttribute?(value: Type, type?: TypeHint): string | null; } declare type AttributeConverter = ComplexAttributeConverter | ((value: string, type?: TypeHint) => Type); export interface PropertyDeclaration { attribute?: boolean | string; type?: TypeHint; converter?: AttributeConverter; reflect?: boolean; hasChanged?(value: Type, oldValue: Type): boolean; noAccessor?: boolean; } export interface PropertyDeclarations { [key: string]: PropertyDeclaration; } export interface HasChanged { (value: unknown, old: unknown): boolean; } export declare const notEqual: HasChanged; export declare abstract class WebComponent extends HTMLElement implements IComponentLifeCycle { getSnapshotBeforeUpdate?(prevProps: ComponentProp, prevState: ComponentProp): any; private static _attributeToPropertyMap; private static _classProperties; private static _finalized; static properties: PropertyDeclarations; private static _propertyValueFromAttribute; private static _attributeNameForProperty; private static _propertyValueToAttribute; static readonly observedAttributes: any[]; private static _finalize; private _reflectingProperties; private _pendProps; private _updatePromise; private _stateFlags; private _alternalState; private __part; componentDidCatch?(e: Error): void; state?: ComponentProp; __props: ComponentProp; props: ComponentProp; static createProperty(name: PropertyKey, options?: PropertyDeclaration): void; constructor(); private _markFlag; private _clearFlag; private _hasFlag; initialize(): void; requestUpdate(name?: string, oldValue?: any, callback?: () => void): void; private __updateThisProps; protected performUpdate(): void | Promise; private _markUpdated; private _enqueueUpdate; protected update(): void; abstract render(): ITemplateResult; private _propertyToAttribute; private _attributeToProperty; protected attributeChangedCallback(name: string, old: string | null, value: string | null): void; disconnectedCallback(): void; componentWillReceiveProps(nextProps: ComponentProp): void; componentDidMount(): void; componentDidUpdate(prevProps: ComponentProp, prevState: ComponentProp, snapshot?: any): void; componentWillUnmount(): void; componentWillMount(): void; shouldComponentUpdate(nextProps: ComponentProp, nextState: ComponentProp): boolean; forceUpdate(callback?: () => void): void; setState(partialState?: Partial, callback?: () => void): void; } export declare function defineWebComponent(name: string, componentClz: typeof WebComponent): (componentClz1: typeof WebComponent) => void; interface ClassElement { kind: 'field' | 'method'; key: PropertyKey; placement: 'static' | 'prototype' | 'own'; initializer?: Function; extras?: ClassElement[]; finisher?: (clazz: Constructor) => undefined | Constructor; descriptor?: PropertyDescriptor; } /** * A property decorator which creates a LitElement property which reflects a * corresponding attribute value. A `PropertyDeclaration` may optionally be * supplied to configure property features. * * @ExportDecoratedItems */ export declare function property(options?: PropertyDeclaration): (protoOrDescriptor: Object | ClassElement, name?: string | number | symbol) => any; export {};