dothtml-interfaces 0.1.44 → 0.1.46
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 +1 -1
- package/src/i-component.d.ts +5 -1
- package/src/i-dot.d.ts +1 -1
package/package.json
CHANGED
package/src/i-component.d.ts
CHANGED
|
@@ -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
|
-
|
|
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;
|
package/src/i-dot.d.ts
CHANGED
|
@@ -518,7 +518,7 @@ interface IDotGenericElement extends IDotAttrBuilder<IDotGenericElement>{}
|
|
|
518
518
|
|
|
519
519
|
// Interface for specific elements:
|
|
520
520
|
|
|
521
|
-
interface IMountedComponent<T extends IComponent>
|
|
521
|
+
interface IMountedComponent<T extends IComponent>{
|
|
522
522
|
on(event: string, callback: (...args: Array<any>)=>void): IMountedComponent<T>;
|
|
523
523
|
prop(name: string, value: any): IMountedComponent<T>;
|
|
524
524
|
}
|