mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 13:29:41 +02:00
chore(deps): upgrade typescript [EE-4841] (#8247)
This commit is contained in:
parent
365316971b
commit
6ef53f0598
17 changed files with 62 additions and 41 deletions
|
@ -35,7 +35,7 @@ type PropNames<T> = Exclude<keyof T, number | symbol>;
|
|||
* if the second parameter has any ts errors check that the component has the correct props
|
||||
*/
|
||||
export function react2angular<T, U extends PropNames<T>[]>(
|
||||
Component: React.ComponentType<T>,
|
||||
Component: React.ComponentType<T & JSX.IntrinsicAttributes>,
|
||||
propNames: U & ([PropNames<T>] extends [U[number]] ? unknown : PropNames<T>)
|
||||
): IComponentOptions & { name: string } {
|
||||
const bindings = Object.fromEntries(propNames.map((key) => [key, '<']));
|
||||
|
@ -61,7 +61,7 @@ export function react2angular<T, U extends PropNames<T>[]>(
|
|||
ReactDOM.render(
|
||||
<StrictMode>
|
||||
{/* eslint-disable-next-line react/jsx-props-no-spreading */}
|
||||
<Component {...(props as T)} />
|
||||
<Component {...(props as T & JSX.IntrinsicAttributes)} />
|
||||
</StrictMode>,
|
||||
|
||||
el
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue