mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-24 12:19:20 +00:00
Git - remove proposed api typings from git/github extensions (#237409)
This commit is contained in:
@@ -13,7 +13,7 @@ import { combinedDisposable, filterEvent, mapEvent } from '../util';
|
||||
import { toGitUri } from '../uri';
|
||||
import { GitExtensionImpl } from './extension';
|
||||
import { GitBaseApi } from '../git-base';
|
||||
import { PickRemoteSourceOptions } from './git-base';
|
||||
import { PickRemoteSourceOptions } from '../typings/git-base';
|
||||
import { OperationKind, OperationResult } from '../operation';
|
||||
|
||||
class ApiInputBox implements InputBox {
|
||||
|
||||
@@ -18,7 +18,7 @@ import { dispose, getCommitShortHash, grep, isDefined, isDescendant, pathEquals,
|
||||
import { GitTimelineItem } from './timelineProvider';
|
||||
import { ApiRepository } from './api/api1';
|
||||
import { getRemoteSourceActions, pickRemoteSource } from './remoteSource';
|
||||
import { RemoteSourceAction } from './api/git-base';
|
||||
import { RemoteSourceAction } from './typings/git-base';
|
||||
|
||||
abstract class CheckoutCommandItem implements QuickPickItem {
|
||||
abstract get label(): string;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { extensions } from 'vscode';
|
||||
import { API as GitBaseAPI, GitBaseExtension } from './api/git-base';
|
||||
import { API as GitBaseAPI, GitBaseExtension } from './typings/git-base';
|
||||
|
||||
export class GitBaseApi {
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { PickRemoteSourceOptions, PickRemoteSourceResult } from './api/git-base';
|
||||
import { PickRemoteSourceOptions, PickRemoteSourceResult } from './typings/git-base';
|
||||
import { GitBaseApi } from './git-base';
|
||||
|
||||
export async function pickRemoteSource(options: PickRemoteSourceOptions & { branch?: false | undefined }): Promise<string | undefined>;
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/180582
|
||||
|
||||
export namespace workspace {
|
||||
/**
|
||||
*
|
||||
* @param scheme The URI scheme that this provider can provide canonical URIs for.
|
||||
* A canonical URI represents the conversion of a resource's alias into a source of truth URI.
|
||||
* Multiple aliases may convert to the same source of truth URI.
|
||||
* @param provider A provider which can convert URIs of scheme @param scheme to
|
||||
* a canonical URI which is stable across machines.
|
||||
*/
|
||||
export function registerCanonicalUriProvider(scheme: string, provider: CanonicalUriProvider): Disposable;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param uri The URI to provide a canonical URI for.
|
||||
* @param token A cancellation token for the request.
|
||||
*/
|
||||
export function getCanonicalUri(uri: Uri, options: CanonicalUriRequestOptions, token: CancellationToken): ProviderResult<Uri>;
|
||||
}
|
||||
|
||||
export interface CanonicalUriProvider {
|
||||
/**
|
||||
*
|
||||
* @param uri The URI to provide a canonical URI for.
|
||||
* @param options Options that the provider should honor in the URI it returns.
|
||||
* @param token A cancellation token for the request.
|
||||
* @returns The canonical URI for the requested URI or undefined if no canonical URI can be provided.
|
||||
*/
|
||||
provideCanonicalUri(uri: Uri, options: CanonicalUriRequestOptions, token: CancellationToken): ProviderResult<Uri>;
|
||||
}
|
||||
|
||||
export interface CanonicalUriRequestOptions {
|
||||
/**
|
||||
*
|
||||
* The desired scheme of the canonical URI.
|
||||
*/
|
||||
targetScheme: string;
|
||||
}
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/157734
|
||||
|
||||
export namespace workspace {
|
||||
/**
|
||||
* An event that is emitted when an edit session identity is about to be requested.
|
||||
*/
|
||||
export const onWillCreateEditSessionIdentity: Event<EditSessionIdentityWillCreateEvent>;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param scheme The URI scheme that this provider can provide edit session identities for.
|
||||
* @param provider A provider which can convert URIs for workspace folders of scheme @param scheme to
|
||||
* an edit session identifier which is stable across machines. This enables edit sessions to be resolved.
|
||||
*/
|
||||
export function registerEditSessionIdentityProvider(scheme: string, provider: EditSessionIdentityProvider): Disposable;
|
||||
}
|
||||
|
||||
export interface EditSessionIdentityProvider {
|
||||
/**
|
||||
*
|
||||
* @param workspaceFolder The workspace folder to provide an edit session identity for.
|
||||
* @param token A cancellation token for the request.
|
||||
* @returns A string representing the edit session identity for the requested workspace folder.
|
||||
*/
|
||||
provideEditSessionIdentity(workspaceFolder: WorkspaceFolder, token: CancellationToken): ProviderResult<string>;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param identity1 An edit session identity.
|
||||
* @param identity2 A second edit session identity to compare to @param identity1.
|
||||
* @param token A cancellation token for the request.
|
||||
* @returns An {@link EditSessionIdentityMatch} representing the edit session identity match confidence for the provided identities.
|
||||
*/
|
||||
provideEditSessionIdentityMatch(identity1: string, identity2: string, token: CancellationToken): ProviderResult<EditSessionIdentityMatch>;
|
||||
}
|
||||
|
||||
export enum EditSessionIdentityMatch {
|
||||
Complete = 100,
|
||||
Partial = 50,
|
||||
None = 0
|
||||
}
|
||||
|
||||
export interface EditSessionIdentityWillCreateEvent {
|
||||
|
||||
/**
|
||||
* A cancellation token.
|
||||
*/
|
||||
readonly token: CancellationToken;
|
||||
|
||||
/**
|
||||
* The workspace folder to create an edit session identity for.
|
||||
*/
|
||||
readonly workspaceFolder: WorkspaceFolder;
|
||||
|
||||
/**
|
||||
* Allows to pause the event until the provided thenable resolves.
|
||||
*
|
||||
* *Note:* This function can only be called during event dispatch.
|
||||
*
|
||||
* @param thenable A thenable that delays saving.
|
||||
*/
|
||||
waitUntil(thenable: Thenable<any>): void;
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,9 @@
|
||||
"include": [
|
||||
"src/**/*",
|
||||
"../../src/vscode-dts/vscode.d.ts",
|
||||
"../../src/vscode-dts/vscode.proposed.canonicalUriProvider.d.ts",
|
||||
"../../src/vscode-dts/vscode.proposed.diffCommand.d.ts",
|
||||
"../../src/vscode-dts/vscode.proposed.editSessionIdentityProvider.d.ts",
|
||||
"../../src/vscode-dts/vscode.proposed.quickDiffProvider.d.ts",
|
||||
"../../src/vscode-dts/vscode.proposed.quickPickSortByLabel.d.ts",
|
||||
"../../src/vscode-dts/vscode.proposed.scmActionButton.d.ts",
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
declare module 'vscode' {
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/180582
|
||||
|
||||
export namespace workspace {
|
||||
/**
|
||||
*
|
||||
* @param scheme The URI scheme that this provider can provide canonical URIs for.
|
||||
* A canonical URI represents the conversion of a resource's alias into a source of truth URI.
|
||||
* Multiple aliases may convert to the same source of truth URI.
|
||||
* @param provider A provider which can convert URIs of scheme @param scheme to
|
||||
* a canonical URI which is stable across machines.
|
||||
*/
|
||||
export function registerCanonicalUriProvider(scheme: string, provider: CanonicalUriProvider): Disposable;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param uri The URI to provide a canonical URI for.
|
||||
* @param token A cancellation token for the request.
|
||||
*/
|
||||
export function getCanonicalUri(uri: Uri, options: CanonicalUriRequestOptions, token: CancellationToken): ProviderResult<Uri>;
|
||||
}
|
||||
|
||||
export interface CanonicalUriProvider {
|
||||
/**
|
||||
*
|
||||
* @param uri The URI to provide a canonical URI for.
|
||||
* @param options Options that the provider should honor in the URI it returns.
|
||||
* @param token A cancellation token for the request.
|
||||
* @returns The canonical URI for the requested URI or undefined if no canonical URI can be provided.
|
||||
*/
|
||||
provideCanonicalUri(uri: Uri, options: CanonicalUriRequestOptions, token: CancellationToken): ProviderResult<Uri>;
|
||||
}
|
||||
|
||||
export interface CanonicalUriRequestOptions {
|
||||
/**
|
||||
*
|
||||
* The desired scheme of the canonical URI.
|
||||
*/
|
||||
targetScheme: string;
|
||||
}
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/176316
|
||||
|
||||
declare module 'vscode' {
|
||||
export interface TreeItem {
|
||||
shareableItem?: ShareableItem;
|
||||
}
|
||||
|
||||
export interface ShareableItem {
|
||||
resourceUri: Uri;
|
||||
selection?: Range;
|
||||
}
|
||||
|
||||
export interface ShareProvider {
|
||||
readonly id: string;
|
||||
readonly label: string;
|
||||
readonly priority: number;
|
||||
|
||||
provideShare(item: ShareableItem, token: CancellationToken): ProviderResult<Uri>;
|
||||
}
|
||||
|
||||
export namespace window {
|
||||
export function registerShareProvider(selector: DocumentSelector, provider: ShareProvider): Disposable;
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,8 @@
|
||||
},
|
||||
"include": [
|
||||
"src/**/*",
|
||||
"../../src/vscode-dts/vscode.d.ts"
|
||||
"../../src/vscode-dts/vscode.d.ts",
|
||||
"../../src/vscode-dts/vscode.proposed.canonicalUriProvider.d.ts",
|
||||
"../../src/vscode-dts/vscode.proposed.shareProvider.d.ts"
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user