chore: fixing the api-report and clean up the types
Signed-off-by: blam <ben@blam.sh>
This commit is contained in:
@@ -225,8 +225,8 @@ export const EntityListProvider: <EntityFilters extends DefaultEntityFilters>({
|
||||
}: PropsWithChildren<{}>) => JSX.Element;
|
||||
|
||||
// @public (undocumented)
|
||||
export type EntityLoadingStatus = {
|
||||
entity?: Entity;
|
||||
export type EntityLoadingStatus<TEntity extends Entity = Entity> = {
|
||||
entity?: TEntity;
|
||||
loading: boolean;
|
||||
error?: Error;
|
||||
refresh?: VoidFunction;
|
||||
@@ -525,23 +525,16 @@ export type UnregisterEntityDialogProps = {
|
||||
|
||||
// @public
|
||||
export function useAsyncEntity<
|
||||
T extends Entity = Entity,
|
||||
>(): UseAsyncEntityResponse<T>;
|
||||
TEntity extends Entity = Entity,
|
||||
>(): EntityLoadingStatus;
|
||||
|
||||
// @public
|
||||
export interface UseAsyncEntityResponse<T> {
|
||||
// (undocumented)
|
||||
entity?: T;
|
||||
// (undocumented)
|
||||
error?: Error;
|
||||
// (undocumented)
|
||||
export function useEntity<TEntity extends Entity = Entity>(): {
|
||||
entity: TEntity;
|
||||
loading: boolean;
|
||||
// (undocumented)
|
||||
error?: Error;
|
||||
refresh?: VoidFunction;
|
||||
}
|
||||
|
||||
// @public
|
||||
export function useEntity<T extends Entity = Entity>(): UseEntityResponse<T>;
|
||||
};
|
||||
|
||||
// @public @deprecated
|
||||
export const useEntityCompoundName: () => {
|
||||
@@ -583,18 +576,6 @@ export function useEntityPermission(permission: Permission): {
|
||||
error?: Error;
|
||||
};
|
||||
|
||||
// @public
|
||||
export interface UseEntityResponse<T> {
|
||||
// (undocumented)
|
||||
entity: T;
|
||||
// @deprecated (undocumented)
|
||||
error?: Error;
|
||||
// @deprecated (undocumented)
|
||||
loading: boolean;
|
||||
// @deprecated (undocumented)
|
||||
refresh?: VoidFunction;
|
||||
}
|
||||
|
||||
// @public
|
||||
export function useEntityTypeFilter(): {
|
||||
loading: boolean;
|
||||
|
||||
@@ -24,8 +24,6 @@ export type {
|
||||
EntityLoadingStatus,
|
||||
EntityProviderProps,
|
||||
AsyncEntityProviderProps,
|
||||
UseEntityResponse,
|
||||
UseAsyncEntityResponse,
|
||||
} from './useEntity';
|
||||
export { useEntityCompoundName } from './useEntityCompoundName';
|
||||
export {
|
||||
|
||||
@@ -27,7 +27,7 @@ import { catalogApiRef } from '../api';
|
||||
import { useEntityCompoundName } from './useEntityCompoundName';
|
||||
|
||||
/** @public */
|
||||
export type EntityLoadingStatus<TEntity = Entity> = {
|
||||
export type EntityLoadingStatus<TEntity extends Entity = Entity> = {
|
||||
entity?: TEntity;
|
||||
loading: boolean;
|
||||
error?: Error;
|
||||
|
||||
Reference in New Issue
Block a user