/** * Copyright 2015 The Incremental DOM Authors. * Copyright 2017 trivago N.V. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS-IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * @param {string} tag The element's tag. * @param {?string=} key The key used to identify this element. This can be an * empty string, but performance may be better if a unique value is used * when iterating over an array of items. * @param {?Array<*>=} statics An array of attribute name/value pairs of the * static attributes for the Element. These will only be set once when the * Element is created. * @param {...*} var_args Attribute name/value pairs of the dynamic attributes * for the Element. * @return {!Element} The corresponding Element. */ declare var elementOpen: (tag: any, key: any, statics: any, var_args: any) => any; /** * Declares a virtual Element at the current location in the document. This * corresponds to an opening tag and a elementClose tag is required. This is * like elementOpen, but the attributes are defined using the attr function * rather than being passed as arguments. Must be folllowed by 0 or more calls * to attr, then a call to elementOpenEnd. * @param {string} tag The element's tag. * @param {?string=} key The key used to identify this element. This can be an * empty string, but performance may be better if a unique value is used * when iterating over an array of items. * @param {?Array<*>=} statics An array of attribute name/value pairs of the * static attributes for the Element. These will only be set once when the * Element is created. */ declare var elementOpenStart: (tag: any, key: any, statics: any, var_args: any) => void; /*** * Defines a virtual attribute at this point of the DOM. This is only valid * when called between elementOpenStart and elementOpenEnd. * * @param {string} name * @param {*} value */ declare var attr: (name: any, value: any) => void; /** * Closes an open tag started with elementOpenStart. * @return {!Element} The corresponding Element. */ declare var elementOpenEnd: () => any; /** * Closes an open virtual Element. * * @param {string} tag The element's tag. * @return {!Element} The corresponding Element. */ declare var elementClose: (tag: any) => void; /** * Declares a virtual Element at the current location in the document that has * no children. * @param {string} tag The element's tag. * @param {?string=} key The key used to identify this element. This can be an * empty string, but performance may be better if a unique value is used * when iterating over an array of items. * @param {?Array<*>=} statics An array of attribute name/value pairs of the * static attributes for the Element. These will only be set once when the * Element is created. * @param {...*} var_args Attribute name/value pairs of the dynamic attributes * for the Element. * @return {!Element} The corresponding Element. */ declare var elementVoid: (tag: any, key: any, statics: any, var_args: any) => void; declare var ref: (id: any) => (element: any) => { unsubscribe(): void; }; /** * Creates a new RawString that may contain HTML that should be rendered * as is and should not be escaped. * * @param {string} value The wrapped String. */ declare var rawString: (value: any) => any; /** * Declares a virtual Text at this point in the document. * * @param {string|number|boolean|RawString} value The value of the Text. * @param {...(function((string|number|boolean)):string)} var_args * Functions to format the value which are called only when the value has * changed. * @return {!Text} The corresponding text node. */ declare var text: (value: any, var_args: any) => void | Text; declare var raw: (value: any) => void; /** */ export { elementOpenStart, elementOpenEnd, elementOpen, elementVoid, elementClose, text, attr, ref, raw, rawString, };