Skip to content

Commit

Permalink
fix: fix generic type of component integrations
Browse files Browse the repository at this point in the history
  • Loading branch information
beawar committed Dec 16, 2024
1 parent 8294855 commit 7b0fc97
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions api-extractor/carbonio-shell-ui.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@ export const getI18n: AppDependantExports['getI18n'];
const getI18n_2: (app: string) => () => i18n;

// @public (undocumented)
export const getIntegratedComponent: <TComponent extends React_2.ComponentType = React_2.ComponentType<Record<string, unknown>>>(id: string) => [TComponent, boolean];
export const getIntegratedComponent: <TComponent extends React_2.ComponentType<any> = React_2.ComponentType<Record<string, unknown>>>(id: string) => [TComponent, boolean];

// @public (undocumented)
export const getIntegratedFunction: <TFunction extends AnyFunction = AnyFunction>(id: string) => [TFunction, boolean];
Expand Down Expand Up @@ -1381,7 +1381,7 @@ export const useCurrentRoute: () => AppRoute | undefined;
export function useGoBackHistoryCallback(): () => void;

// @public (undocumented)
export const useIntegratedComponent: <TComponent extends React_2.ComponentType = React_2.ComponentType<Record<string, unknown>>>(id: string) => [TComponent, boolean];
export const useIntegratedComponent: <TComponent extends React_2.ComponentType<any> = React_2.ComponentType<Record<string, unknown>>>(id: string) => [TComponent, boolean];

// @public (undocumented)
export const useIntegratedFunction: <TFunction extends AnyFunction = AnyFunction>(id: string) => [TFunction, boolean];
Expand Down
3 changes: 2 additions & 1 deletion src/store/integrations/getters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ export const getIntegratedFunction = <TFunction extends AnyFunction = AnyFunctio
};

export const getIntegratedComponent = <
TComponent extends React.ComponentType = React.ComponentType<Record<string, unknown>>
// eslint-disable-next-line @typescript-eslint/no-explicit-any
TComponent extends React.ComponentType<any> = React.ComponentType<Record<string, unknown>>
>(
id: string
): [TComponent, boolean] => {
Expand Down
3 changes: 2 additions & 1 deletion src/store/integrations/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ export const useIntegratedFunction = <TFunction extends AnyFunction = AnyFunctio
};

export const useIntegratedComponent = <
TComponent extends React.ComponentType = React.ComponentType<Record<string, unknown>>
// eslint-disable-next-line @typescript-eslint/no-explicit-any
TComponent extends React.ComponentType<any> = React.ComponentType<Record<string, unknown>>
>(
id: string
): [TComponent, boolean] => {
Expand Down

0 comments on commit 7b0fc97

Please sign in to comment.