import { Position, Range } from 'vscode-languageserver-types';
/**
 * RepoURI is a URI identifing a repository resource, like
 *   - the repository itself: `git://github.com/gorilla/mux`
 *   - the repository at a particular revision: `git://github.com/gorilla/mux?rev`
 *   - a file in a repository at an immutable revision: `git://github.com/gorilla/mux?SHA#path/to/file.go
 *   - a line in a file in a repository at an immutable revision: `git://github.com/gorilla/mux?SHA#path/to/file.go:3
 *   - a character position in a file in a repository at an immutable revision: `git://github.com/gorilla/mux?SHA#path/to/file.go:3,5
 *   - a rangein a file in a repository at an immutable revision: `git://github.com/gorilla/mux?SHA#path/to/file.go:3,5-4,9
 */
export declare type RepoURI = string;
export interface RepoSpec {
    /**
     * Example: github.com/gorilla/mux
     */
    repoPath: string;
}
export interface RevSpec {
    /**
     * a revision string (like 'master' or 'my-branch' or '24fca303ac6da784b9e8269f724ddeb0b2eea5e7')
     */
    rev: string;
}
export interface ResolvedRevSpec {
    /**
     * a 40 character commit SHA
     */
    commitID: string;
}
export interface FileSpec {
    /**
     * a path to a directory or file
     */
    filePath: string;
}
export interface PositionSpec {
    /**
     * a 1-indexed point in the blob
     */
    position: Position;
}
export interface RangeSpec {
    /**
     * a 1-indexed range in the blob
     */
    range: Range;
}
export declare type BlobViewState = 'references' | 'references:external' | 'discussions' | 'impl';
export interface ViewStateSpec {
    /**
     * The view state (for the blob panel).
     */
    viewState: BlobViewState;
}
/**
 * 'code' for Markdown/rich-HTML files rendered as code, 'rendered' for rendering them as
 * Markdown/rich-HTML, undefined for the default for the file type ('rendered' for Markdown, etc.,
 * 'code' otherwise).
 */
export declare type RenderMode = 'code' | 'rendered' | undefined;
export interface RenderModeSpec {
    /**
     * How the file should be rendered.
     */
    renderMode: RenderMode;
}
/**
 * Properties of a RepoURI (like git://github.com/gorilla/mux#mux.go) or a URL (like https://sourcegraph.com/github.com/gorilla/mux/-/blob/mux.go)
 */
export interface ParsedRepoURI extends RepoSpec, Partial<RevSpec>, Partial<ResolvedRevSpec>, Partial<FileSpec>, Partial<PositionSpec>, Partial<RangeSpec> {
}
/**
 * A repo
 */
export interface Repo extends RepoSpec {
}
/**
 * A repo with a (possibly unresolved) revspec.
 */
export interface RepoRev extends RepoSpec, RevSpec {
}
/**
 * A repo resolved to an exact commit
 */
export interface AbsoluteRepo extends RepoSpec, RevSpec, ResolvedRevSpec {
}
/**
 * A file in a repo
 */
export interface RepoFile extends RepoSpec, RevSpec, Partial<ResolvedRevSpec>, FileSpec {
}
/**
 * A file at an exact commit
 */
export interface AbsoluteRepoFile extends RepoSpec, RevSpec, ResolvedRevSpec, FileSpec {
}
/**
 * A position in file
 */
export interface RepoFilePosition extends RepoSpec, RevSpec, Partial<ResolvedRevSpec>, FileSpec, PositionSpec, Partial<ViewStateSpec>, Partial<RenderModeSpec> {
}
/**
 * A position in file at an exact commit
 */
export interface AbsoluteRepoFilePosition extends RepoSpec, RevSpec, ResolvedRevSpec, FileSpec, PositionSpec, Partial<ViewStateSpec>, Partial<RenderModeSpec> {
}
/**
 * A range in file at an exact commit
 */
export interface AbsoluteRepoFileRange extends RepoSpec, RevSpec, ResolvedRevSpec, FileSpec, RangeSpec, Partial<ViewStateSpec>, Partial<RenderModeSpec> {
}
/**
 * Parses the properties of a repo URI like git://github.com/gorilla/mux#mux.go
 */
export declare function parseRepoURI(uri: RepoURI): ParsedRepoURI;
/** The results of parsing a repo-rev string like "my/repo@my/rev". */
export interface ParsedRepoRev {
    repoPath: string;
    /** The URI-decoded revision (e.g., "my#branch" in "my/repo@my%23branch"). */
    rev?: string;
    /** The raw revision (e.g., "my%23branch" in "my/repo@my%23branch"). */
    rawRev?: string;
}
/**
 * Parses a repo-rev string like "my/repo@my/rev" to the repo and rev components.
 */
export declare function parseRepoRev(repoRev: string): ParsedRepoRev;
/**
 * Parses the properties of a blob URL.
 */
export declare function parseBrowserRepoURL(href: string): ParsedRepoURI;
/**
 * Replaces the revision in the given URL, or adds one if there is not already
 * one.
 * @param href The URL whose revision should be replaced.
 */
export declare function replaceRevisionInURL(href: string, newRev: string): string;
/**
 * The inverse of parseRepoURI, this generates a string from parsed values.
 */
export declare function makeRepoURI(parsed: ParsedRepoURI): RepoURI;
/**
 * Retrieves the <td> element at the specified line on the current document.
 */
export declare function getBlobTableRow(line: number): HTMLTableRowElement;
/**
 * Retrieves the <td> elements for the specified line range (inclusive) on
 * the current document.
 */
export declare function getBlobTableRows(line: number, endLine?: number): HTMLTableRowElement[];
/**
 * Performs a redirect to the host of the given URL with the path, query etc. properties of the current URL.
 */
export declare function redirectToExternalHost(externalRedirectURL: string): void;
//# sourceMappingURL=index.d.ts.map