UNPKG

@teambit/workspace

Version:
29 lines (28 loc) 1.93 kB
import { ComponentModel } from '@teambit/component'; import { ComponentID } from '@teambit/component-id'; import { Workspace } from './workspace-model'; type UseWorkspaceOptions = { onComponentAdded?: (component: ComponentModel[]) => void; onComponentUpdated?: (component: ComponentModel[]) => void; onComponentRemoved?: (compId: ComponentID[]) => void; }; export declare function useWorkspace(options?: UseWorkspaceOptions): { error?: import("@apollo/client").ApolloError | undefined; errors?: ReadonlyArray<import("graphql").GraphQLFormattedError> | undefined; loading: boolean; client: import("@apollo/client").ApolloClient<any>; variables: import("@apollo/client").OperationVariables | undefined; observable: import("@apollo/client").ObservableQuery<any, import("@apollo/client").OperationVariables>; networkStatus: import("@apollo/client").NetworkStatus; called: boolean; startPolling: (pollInterval: number) => void; stopPolling: () => void; updateQuery: (mapFn: import("@apollo/client").UpdateQueryMapFn<any, import("@apollo/client").OperationVariables>) => void; reobserve: (newOptions?: Partial<import("@apollo/client").WatchQueryOptions<import("@apollo/client").OperationVariables, any>> | undefined, newNetworkStatus?: import("@apollo/client").NetworkStatus) => Promise<import("@apollo/client").ApolloQueryResult<any>>; previousData?: any; fetchMore: (options: import("@apollo/client").FetchMoreQueryOptions<import("@apollo/client").OperationVariables, any>) => Promise<import("@apollo/client").ApolloQueryResult<any>>; refetch: (variables?: Partial<import("@apollo/client").OperationVariables> | undefined) => Promise<import("@apollo/client").ApolloQueryResult<any>>; workspace: Workspace | undefined; subscribeToMore: import("@apollo/client").SubscribeToMoreFunction<any, import("@apollo/client").OperationVariables>; }; export {};