Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

combineProps type error since typescript 5.3 #554

Open
GiyoMoon opened this issue Dec 23, 2023 · 0 comments
Open

combineProps type error since typescript 5.3 #554

GiyoMoon opened this issue Dec 23, 2023 · 0 comments

Comments

@GiyoMoon
Copy link

Describe the bug

I noticed that combineProps throws a type error when upgrading to typescript 5.3. In typescript <=5.2, the same code worked without issues.

import { combineProps } from '@solid-primitives/props'
import { Dynamic, DynamicProps } from 'solid-js/web'
import type { ValidComponent } from 'solid-js'

const MyComponent = <T extends ValidComponent = 'div'>(
  props: DynamicProps<T>,
) => {
  const combinedProps = combineProps([props])
  const children = <div>children</div>
  // This worked with typescript version <= 5.2 and broke in 5.3
  return <Dynamic {...combinedProps}>{children}</Dynamic>
}

export default MyComponent
image

Minimal Reproduction Link

https://github.com/GiyoMoon/solid-primitives-type-error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant