dothtml-interfaces 0.2.6 → 0.2.8

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.2.6",
3
+ "version": "0.2.8",
4
4
  "description": "Dependency injection interfaces for DOTHtml.",
5
5
  "main": "src/index.d.ts",
6
6
  "types": "src/index.d.ts",
@@ -26,22 +26,18 @@ export interface FrameworkItems {
26
26
  // html: IDotGenericElement;
27
27
  }
28
28
 
29
- export type ComponentArgs<TProps extends Array<string>, TEvents extends Array<string>> = {
30
- [key in TProps[number]]: any;
31
- } & {
32
- [key in TEvents[number]]: (...args: any[]) => void;
33
- }
34
-
35
29
 
36
30
  // TODO: there's a weird problem where if a constructor is not provided, it's not possible have a custom builder.
37
31
  // It should be the contsructor that depends on the builder, not the other way around. If we can't get this working,
38
32
  // it might just be better to rethink how stuff gets passed into components.
39
- export default interface IComponent<TProps extends Array<string> = [], TEvents extends Array<string> = []> {
33
+ export default interface IComponent/*<TProps extends Array<string> = [], TEvents extends Array<string> = []>*/ {
40
34
 
41
35
  readonly _?: FrameworkItems;
42
36
 
43
- new (attrs?: ComponentArgs<TProps, TEvents>): IComponent<TProps, TEvents>;
44
- new (): IComponent<TProps, TEvents>;
37
+ // Regrettably, TS forces clients to implement the constructor, which is not ideal because we want to internalize that.
38
+ // There's no way to make the constructor optional.
39
+ // new (attrs?: ComponentArgs<TProps, TEvents>): IComponent<TProps, TEvents>;
40
+ // new (): IComponent<TProps, TEvents>;
45
41
 
46
42
  // Lifecycle hooks
47
43