logux / client

Logux base components to build web client
https://logux.org/
MIT License
663 stars 47 forks source link

[react] ChannelErrors must explicitly accept children props with @types/react~18 #92

Closed g12i closed 2 years ago

g12i commented 2 years ago

As per https://github.com/DefinitelyTyped/DefinitelyTyped/pull/56210 change children must be specified explicitly.

No overload matches this call.
  Overload 1 of 2, '(props: ReactErrorHandlers | Readonly<ReactErrorHandlers>): ChannelErrors', gave the following error.
    Type '{ children: Element; AccessDenied: FC<{}>; NotFound: FC<{}>; Error: FC<{}>; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<ChannelErrors> & Readonly<ReactErrorHandlers>'.
      Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<ChannelErrors> & Readonly<ReactErrorHandlers>'.
  Overload 2 of 2, '(props: ReactErrorHandlers, context: any): ChannelErrors', gave the following error.
    Type '{ children: Element; AccessDenied: FC<{}>; NotFound: FC<{}>; Error: FC<{}>; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<ChannelErrors> & Readonly<ReactErrorHandlers>'.
      Property 'children' does not exist on type 'IntrinsicAttributes & IntrinsicClassAttributes<ChannelErrors> & Readonly<ReactErrorHandlers>'.ts(2769)
ai commented 2 years ago

Can you send a PR?

I will not have a time on this week because of the talk preparation. But if you will send PR I will release it quickly.

g12i commented 2 years ago

Here it is @ai #93