Buckets:
| /** | |
| * @license | |
| * Copyright 2017 Google LLC | |
| * SPDX-License-Identifier: BSD-3-Clause | |
| */ | |
| import type { ReactiveElement } from '../reactive-element.js'; | |
| import { type Interface } from './base.js'; | |
| export type QueryAsyncDecorator = { | |
| (proto: Interface<ReactiveElement>, name: PropertyKey, descriptor?: PropertyDescriptor): void | any; | |
| <C extends Interface<ReactiveElement>, V extends Promise<Element | null>>(value: ClassAccessorDecoratorTarget<C, V>, context: ClassAccessorDecoratorContext<C, V>): ClassAccessorDecoratorResult<C, V>; | |
| }; | |
| /** | |
| * A property decorator that converts a class property into a getter that | |
| * returns a promise that resolves to the result of a querySelector on the | |
| * element's renderRoot done after the element's `updateComplete` promise | |
| * resolves. When the queried property may change with element state, this | |
| * decorator can be used instead of requiring users to await the | |
| * `updateComplete` before accessing the property. | |
| * | |
| * @param selector A DOMString containing one or more selectors to match. | |
| * | |
| * See: https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector | |
| * | |
| * ```ts | |
| * class MyElement { | |
| * @queryAsync('#first') | |
| * first: Promise<HTMLDivElement>; | |
| * | |
| * render() { | |
| * return html` | |
| * <div id="first"></div> | |
| * <div id="second"></div> | |
| * `; | |
| * } | |
| * } | |
| * | |
| * // external usage | |
| * async doSomethingWithFirst() { | |
| * (await aMyElement.first).doSomething(); | |
| * } | |
| * ``` | |
| * @category Decorator | |
| */ | |
| export declare function queryAsync(selector: string): QueryAsyncDecorator; | |
| //# sourceMappingURL=query-async.d.ts.map |
Xet Storage Details
- Size:
- 1.6 kB
- Xet hash:
- 506570a6400f9da9aae1282d7c68255f689b1572e3a49bc3e95d3df62799bec2
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.