import * as React from 'react'; import { Observable } from 'rxjs'; import { Location } from 'sourcegraph/module/protocol/plainTypes'; import { ErrorLike } from '../../../util/errors'; export declare const FileLocationsError: React.SFC<{ pluralNoun: string; error: ErrorLike; }>; export declare const FileLocationsNotFound: React.SFC<{ pluralNoun: string; }>; interface Props { /** * The function called to query for file locations. */ query: () => Observable<{ loading: boolean; locations: Location[]; }>; /** An observable that upon emission causes the connection to refresh the data (by calling queryConnection). */ updates?: Observable; /** * Used along with the "inputRevision" prop to preserve the original Git revision specifier for the current * repository. */ inputRepo?: string; /** * If given, use this revision in the link URLs to the files (instead of empty) for locations whose repository * matches the "inputRepo" prop. */ inputRevision?: string; /** The icon to use for each location. */ icon: React.ComponentType<{ className?: string; }>; /** Called when a location is selected. */ onSelect?: () => void; /** The plural noun described by the locations, such as "references" or "implementations". */ pluralNoun: string; className: string; isLightTheme: boolean; } interface State { /** * Locations (inside files identified by LSP-style git:// URIs) to display, or an error if they failed to load. * Undefined while loading. */ locationsOrError?: Location[] | ErrorLike; /** Whether to show a loading indicator. */ loading: boolean; itemsToShow: number; } /** * Displays a flat list of file excerpts. For a tree view, use FileLocationsTree. */ export declare class FileLocations extends React.PureComponent { state: State; private componentUpdates; private subscriptions; componentDidMount(): void; componentWillReceiveProps(nextProps: Props): void; componentWillUnmount(): void; render(): JSX.Element | null; private onShowMoreItems; private onSelect; } export {}; //# sourceMappingURL=FileLocations.d.ts.map