1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | import { Disconnectable, Part } from './lit-html';
|
7 | export { AttributePart, BooleanAttributePart, ChildPart, ElementPart, EventPart, Part, PropertyPart, } from './lit-html';
|
8 | export interface DirectiveClass {
|
9 | new (part: PartInfo): Directive;
|
10 | }
|
11 |
|
12 |
|
13 |
|
14 |
|
15 | export declare type DirectiveParameters<C extends Directive> = Parameters<C['render']>;
|
16 |
|
17 |
|
18 |
|
19 |
|
20 | export interface DirectiveResult<C extends DirectiveClass = DirectiveClass> {
|
21 | }
|
22 | export declare const PartType: {
|
23 | readonly ATTRIBUTE: 1;
|
24 | readonly CHILD: 2;
|
25 | readonly PROPERTY: 3;
|
26 | readonly BOOLEAN_ATTRIBUTE: 4;
|
27 | readonly EVENT: 5;
|
28 | readonly ELEMENT: 6;
|
29 | };
|
30 | export declare type PartType = typeof PartType[keyof typeof PartType];
|
31 | export interface ChildPartInfo {
|
32 | readonly type: typeof PartType.CHILD;
|
33 | }
|
34 | export interface AttributePartInfo {
|
35 | readonly type: typeof PartType.ATTRIBUTE | typeof PartType.PROPERTY | typeof PartType.BOOLEAN_ATTRIBUTE | typeof PartType.EVENT;
|
36 | readonly strings?: ReadonlyArray<string>;
|
37 | readonly name: string;
|
38 | readonly tagName: string;
|
39 | }
|
40 | export interface ElementPartInfo {
|
41 | readonly type: typeof PartType.ELEMENT;
|
42 | }
|
43 |
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 | export declare type PartInfo = ChildPartInfo | AttributePartInfo | ElementPartInfo;
|
50 |
|
51 |
|
52 |
|
53 |
|
54 | export declare const directive: <C extends DirectiveClass>(c: C) => (...values: Parameters<InstanceType<C>["render"]>) => DirectiveResult<C>;
|
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 | export declare abstract class Directive implements Disconnectable {
|
61 | constructor(_partInfo: PartInfo);
|
62 | get _$isConnected(): boolean;
|
63 | abstract render(...props: Array<unknown>): unknown;
|
64 | update(_part: Part, props: Array<unknown>): unknown;
|
65 | }
|
66 | //# sourceMappingURL=directive.d.ts.map |
\ | No newline at end of file |