export function WaferMixin any>(superclass: T): { new (...args: any[]): { [x: string]: any; /** * Property definitions Prop * * @type {Object.} */ readonly props: { [x: string]: import("./types").Prop; }; /** * Flag indicating if element has been connected to DOM at least once * * @type {boolean} */ _connectedOnce: boolean; /** * Array of property names * * @type {string[]} */ _propNames: string[]; /** * Object of attribute names to property names * * @type {Object.} */ _attrToProp: { [x: string]: string; }; /** * Current values of properties * * * @type {Object.} */ _props: { [x: string]: any; }; /** * Flag indicating pending property * changes are being processed * * @type {Boolean} */ _changing: boolean; /** * Promise that will resolve when all the current updates * have been triggered * * @type {Promise | null} */ _updatePromise: Promise | null; /** * Map of all properties to their new values, that have changed in the * current update cycle * * @type {Map} */ _toUpdate: Map; /** * Flag indicating if this is the first update to occur * * @type {boolean} */ _firstUpdate: boolean; /** * Flag indicating if there are any pending changes in the current update * cycle * * @type {boolean} */ _newChanges: boolean; /** * Indicates if unreflected attributes should be removed * on initialisation * * @type {boolean} */ _removeUnreflectedAttributes: boolean; /** * Initial values of properties * @type {Object.} */ _initials: { [x: string]: any; }; /** * Returns a setter method for named property * * @param {string} name - Property name * @returns {(value: any) => void} */ _setter(name: string): (value: any) => void; /** * Returns a getter for named property * * @param {string} name - Property name * @returns {() => any} */ _getter(name: string): () => any; /** * Set up initial values of properties * * @returns {void} */ initialiseProps(): void; /** * Set initial property values * * @returns {void} */ setupPropValues(): void; /** * Sets property value from named attribute * @param {string} name - Property name * @param {string | null} value - Attribute value * @returns {void} */ _setFromAttribute(name: string, value: string | null): void; /** * Sets attribute from named property value * * @param {string} name - Property name * @param {any} value - Property value * @returns {void} */ _setFromProp(name: string, value: any): void; /** * Callback triggered when an attribute with a name matching a property * name is changed * * @param {string} name - Attribute name * @param {string|null} oldValue - Old attribute value * @param {string|null} newValue - New attribute value * @returns {void} */ attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void; /** * Trigger an update to the component that will be run at the end * of the current task */ triggerUpdate(): Promise; /** * Update property targets for all properties whose values have changed or * have been manually requested * * * @param {String[] | null} [props] * List of property names whose targets should be updated, even if * their value has not changed, in addition to the properties that have * changed. * * An empty array indicates all properties should have their targets * updated. * * `null` indicates that only those properties that have changed should * have their targets updated. * * @returns {void} */ update(props?: string[] | null | undefined): void; /** * Called when all pending property value changes have been processed, * but before their targets have been updated. Changes made to properties * in this callback will not trigger another update, but the updated values * will be used for the current update. * * @param {Map} changed * A Map of properties and their old values that have changed in the * current cycle * * @returns {string[]|Promise|void} * If an array of property names (or a Promise that resolves to an array) is * returned then those properties will not have their targets updated. If * a promise is returned then it will be `await`ed * */ changed(changed: Map): string[] | Promise | void; /** * * Called when all pending property target updates have been called. Changes * made to properties in this callback will trigger another update cycle. * * @param {Map} updated * A Map of properties and their old values that have had their targets * updated in the current cycle. * * @returns {void|Promise} * If a promise is returned then it will be * `await`ed - this is useful in a server context where, if further work is * initiated that results in property changes (and targets updated), the * response shouldn't be set until all changes have been processed. */ updated(updated: Map): void | Promise; /** * Called after the initial update of this component has occurred. * @param {Map} updated * @returns {void|Promise} */ firstUpdated(updated: Map): void | Promise; /** * Manually request an update cycle to run * * @param {String[] | null} [props] * List of property names whose targets should be updated. * * An empty array indicates all properties should have their targets * updated. * * `null` indicates that no properties should have their targets updated. * * @returns {Promise} */ requestUpdate(props?: string[] | null | undefined): Promise; /** * Returns a promise that will resolve when the current update cycle is * complete, or immediately if there is no update pending. * * @returns {Promise} */ updateDone(): Promise; }; /** * Static template string * * @type {string} */ readonly template: string; /** * Property definitions * * @type {Object.} */ readonly props: { [x: string]: import("./types").Prop; }; /** * A list of all attributes whose values should be used to set * properties, using `attributeName` set in props if available * * @type {string[]} */ readonly observedAttributes: string[]; } & T;