Skip to content

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

Open
@yoyos

Description

@yoyos

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",

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions