UNPKG

@surface/custom-element

Version:

Provides support of directives and data binding on custom elements.

39 lines (38 loc) 1.29 kB
import type { IDisposable } from "@surface/core"; import type { DirectiveEntry } from "../../types/index"; import type Block from "../block.js"; import type Expression from "../types/expression.js"; import type Factory from "../types/fatctory.js"; import type ObservablePath from "../types/observable-path.js"; declare type Context = { block: Block; directives: Map<string, DirectiveEntry>; factory: Factory; host: Node; key: Expression<string>; observables: [key: ObservablePath[], value: ObservablePath[]]; parent: Node; scope: object; value: Expression; }; export default class PlaceholdeStatement implements IDisposable { private readonly context; private readonly cancellationTokenSource; private readonly keySubscription; private readonly metadata; private currentDisposable; private disposed; private key; private lazyInjectionCancellationTokenSource; private subscription; private injectionContext?; constructor(context: Context); private readonly applyInjection; private readonly applyLazyInjection; private readonly inject; private readonly onKeyChange; private readonly task; private readonly defaultTask; dispose(): void; } export {};