Skip to content

Commit

Permalink
allows to keep the Host behavior with Component
Browse files Browse the repository at this point in the history
  • Loading branch information
UpperCod committed Jul 16, 2022
1 parent bca9a83 commit 3169823
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "atomico",
"version": "1.60.3",
"version": "1.61.0",
"description": "Atomico is a small library for the creation of interfaces based on web-components, only using functions and hooks.",
"type": "module",
"main": "./core.js",
Expand Down
8 changes: 4 additions & 4 deletions types/core.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,15 @@ interface MetaComponent {
/**
* Functional component validation
*/
export type Component<props = null> = props extends null
export type Component<props = null, meta = any> = props extends null
? {
(props: FillObject): any;
(props: FillObject): Host<meta>;
props?: SchemaProps;
styles?: Sheets;
}
: {
(props: DOMProps<props>): any;
props: SchemaInfer<props> & MetaProps<Partial<props>>;
(props: DOMProps<props>): Host<meta>;
props: SchemaInfer<props>;
styles?: Sheets;
};

Expand Down

0 comments on commit 3169823

Please sign in to comment.