diff options
author | Michal Klocek <michal.klocek@qt.io> | 2024-05-06 12:49:24 +0200 |
---|---|---|
committer | Michal Klocek <michal.klocek@qt.io> | 2024-05-07 09:51:27 +0000 |
commit | 6c04301ecbe57a84d6cc82776b9de9d27fd10076 (patch) | |
tree | ed50ecf908d5dec121b5646c69f9da2e6415965f /chromium/third_party/node/node_modules/lit-html/directives/cache.d.ts | |
parent | bdd23a0120a16de636b411a50c92cd273c4e80fa (diff) |
Missing node module sources
* lit-html
* lit-element
* lit-reactive-element
* lit-directive
Change-Id: Idb8413411ad45acd9350e5f155c39c9789f15b95
Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/558486
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/third_party/node/node_modules/lit-html/directives/cache.d.ts')
-rw-r--r-- | chromium/third_party/node/node_modules/lit-html/directives/cache.d.ts | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/chromium/third_party/node/node_modules/lit-html/directives/cache.d.ts b/chromium/third_party/node/node_modules/lit-html/directives/cache.d.ts new file mode 100644 index 00000000000..a8f7c400fa4 --- /dev/null +++ b/chromium/third_party/node/node_modules/lit-html/directives/cache.d.ts @@ -0,0 +1,35 @@ +/** + * @license + * Copyright 2017 Google LLC + * SPDX-License-Identifier: BSD-3-Clause + */ +import { ChildPart } from '../lit-html.js'; +import { Directive, DirectiveParameters, PartInfo } from '../directive.js'; +declare class CacheDirective extends Directive { + private _templateCache; + private _value?; + constructor(partInfo: PartInfo); + render(v: unknown): unknown[]; + update(containerPart: ChildPart, [v]: DirectiveParameters<this>): unknown[]; +} +/** + * Enables fast switching between multiple templates by caching the DOM nodes + * and TemplateInstances produced by the templates. + * + * Example: + * + * ```js + * let checked = false; + * + * html` + * ${cache(checked ? html`input is checked` : html`input is not checked`)} + * ` + * ``` + */ +export declare const cache: (v: unknown) => import("../directive.js").DirectiveResult<typeof CacheDirective>; +/** + * The type of the class that powers this directive. Necessary for naming the + * directive's return type. + */ +export type { CacheDirective }; +//# sourceMappingURL=cache.d.ts.map
\ No newline at end of file |