Skip to content

Commit

Permalink
[ts] types update
Browse files Browse the repository at this point in the history
  • Loading branch information
enzoaicardi committed Jun 11, 2024
1 parent 2363ea1 commit 0ef4e74
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions dist/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,24 @@ declare module "vifjs" {
useEffect(callback: Function): void;
}

interface VifRenderFunctionProps {
[key: string]: any;
}

interface VifRenderFunctionProperties {
props: VifRenderFunctionProps;
html: (string: TemplateStringsArray | string) => string;
css: (string: TemplateStringsArray | string) => string;
}

/**
* Function used to hydrate datas and create component template & schema
* @see {@link https://github.com/vifjs/vif/tree/main/wiki/methods/define.md}
*/
type VifRenderFunction = (
this: VifElement,
args: {
props: Object;
html: (string: string) => string;
css: (string: string) => string;
}
) => VifElement | NodeList | void;
args: VifRenderFunctionProperties
) => VifElement | NodeList | TemplateStringsArray | string | void;

interface VifSignal {
(updatedValue?: any): [updatedValue: any];
Expand Down

0 comments on commit 0ef4e74

Please sign in to comment.