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

Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes #79

Open
yoyos opened this issue Oct 18, 2022 · 1 comment · May be fixed by #80
Open

Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes #79

yoyos opened this issue Oct 18, 2022 · 1 comment · May be fixed by #80

Comments

@yoyos
Copy link

yoyos commented Oct 18, 2022

Simple example:

<SweetAlert warning title={'my title'} onConfirm={() => <></>}>
        MyContent
      </SweetAlert>

Typescript exception:

S2322: Type '{ children: string; warning: true; title: string; onConfirm: () => Element; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<SweetAlert> & Pick<Pick<Readonly<SweetAlertProps>, keyof SweetAlertProps> & Pick<...> & Pick<...>, "title" | ... 24 more ... | "customButtons"> & InexactPartial<...> & InexactPartial<...>'.
  Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<SweetAlert> & Pick<Pick<Readonly<SweetAlertProps>, keyof SweetAlertProps> & Pick<...> & Pick<...>, "title" | ... 24 more ... | "customButtons"> & InexactPartial<...> & InexactPartial<...>'.

using:

"typescript": "^4.8.4"
"bootstrap": "^5.2.2",
"react-bootstrap": "^2.5.0",
"react": "^18.2.0",
@yoyos yoyos linked a pull request Oct 18, 2022 that will close this issue
@Kaique292
Copy link

code

Just do that

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

Successfully merging a pull request may close this issue.

2 participants