@polymorphic-factory/solid
Advanced tools
Comparing version 0.0.0-rc-20221214172411 to 0.0.0-rc-20230128140721
@@ -21,4 +21,4 @@ import { ComponentProps, ValidComponent, Component, JSX } from 'solid-js'; | ||
}>>; | ||
type HTMLPolymorphicComponents = { | ||
[Tag in DOMElements]: ComponentWithAs<Tag>; | ||
type HTMLPolymorphicComponents<Props extends Record<string, unknown> = Record<never, never>> = { | ||
[Tag in DOMElements]: ComponentWithAs<Tag, Props>; | ||
}; | ||
@@ -28,4 +28,4 @@ type HTMLPolymorphicProps<T extends ElementType> = Omit<ComponentProps<T>, 'ref'> & { | ||
}; | ||
type PolymorphFactory = { | ||
<T extends ElementType, P extends Record<string, unknown> = Record<never, never>, Options = never>(component: T, option?: Options): ComponentWithAs<T, P>; | ||
type PolymorphFactory<Props extends Record<string, unknown> = Record<never, never>, Options = never> = { | ||
<T extends ElementType, P extends Record<string, unknown> = Props>(component: T, option?: Options): ComponentWithAs<T, P>; | ||
}; | ||
@@ -44,4 +44,4 @@ interface PolyFactoryParam<Component extends ElementType, Props extends Record<string, unknown>, Options> { | ||
*/ | ||
declare function polymorphicFactory<Component extends ElementType, Props extends Record<string, unknown>, Options = never>({ styled }?: PolyFactoryParam<Component, Props, Options>): PolymorphFactory & HTMLPolymorphicComponents; | ||
declare function polymorphicFactory<Props extends Record<never, never>, Options = never, Component extends ElementType = ElementType>({ styled }?: PolyFactoryParam<Component, Props, Options>): PolymorphFactory<Props, Options> & HTMLPolymorphicComponents<Props>; | ||
export { Assign, ComponentWithAs, HTMLPolymorphicComponents, HTMLPolymorphicProps, PropsOf, polymorphicFactory }; |
{ | ||
"name": "@polymorphic-factory/solid", | ||
"version": "0.0.0-rc-20221214172411", | ||
"version": "0.0.0-rc-20230128140721", | ||
"description": "", | ||
@@ -36,18 +36,18 @@ "keywords": [ | ||
"devDependencies": { | ||
"@testing-library/dom": "8.19.0", | ||
"@testing-library/dom": "8.20.0", | ||
"@testing-library/jest-dom": "5.16.5", | ||
"@types/jsdom": "20.0.1", | ||
"@types/testing-library__jest-dom": "5.14.5", | ||
"@vitest/coverage-c8": "0.25.8", | ||
"@vitest/coverage-c8": "0.28.3", | ||
"clean-package": "2.2.0", | ||
"esbuild": "0.16.6", | ||
"esbuild-plugin-solid": "0.4.2", | ||
"jsdom": "20.0.3", | ||
"solid-js": "1.6.5", | ||
"esbuild": "0.17.5", | ||
"esbuild-plugin-solid": "0.5.0", | ||
"jsdom": "21.1.0", | ||
"solid-js": "1.6.9", | ||
"solid-testing-library": "0.5.0", | ||
"tsup": "6.5.0", | ||
"typescript": "4.9.4", | ||
"vite": "4.0.1", | ||
"vite": "4.0.4", | ||
"vite-plugin-solid": "2.5.0", | ||
"vitest": "0.25.8" | ||
"vitest": "0.28.3" | ||
}, | ||
@@ -54,0 +54,0 @@ "peerDependencies": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11148