dothtml-interfaces 0.1.43 → 0.1.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dothtml-interfaces",
3
- "version": "0.1.43",
3
+ "version": "0.1.45",
4
4
  "description": "Dependency injection interfaces for DOTHtml.",
5
5
  "main": "src/index.d.ts",
6
6
  "types": "src/index.d.ts",
@@ -2,15 +2,19 @@
2
2
  import { IDotDocument, IDotGenericElement } from "./i-dot";
3
3
  import IDotCss from "./i-dot-css";
4
4
 
5
+ // export type EventNames<T> = T extends { allowedEvents: infer E } ? E : never;
6
+
5
7
  // TODO: I think this could be typed so that it forces you to emit events from the list of strings.
6
8
  export interface FrameworkItems {
7
9
  /**
8
10
  * The shadow root element of the component.
9
11
  */
10
12
  readonly refs: { [key: string]: HTMLElement };
11
- readonly emit: (event: string, ...args: Array<any>)=>void;
13
+ emit<T>(event: string, ...args: Array<any>): void;
12
14
  restyle(): void;
15
+ readonly props: Record<string, any>;
13
16
  readonly _meta: {
17
+ readonly allowedEvents: string[];
14
18
  readonly shadowRoot: ShadowRoot;
15
19
  readonly isRendered: boolean;
16
20
  readonly tagName: string;