mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
Mark most Event properties as readonly
We want to prevent mistaken changes that do something like this:
```ts
foo.onEvent = () => { ... };
```
When they almost always mean:
```ts
foo.onEvent(() => { ... })
```
This commit is contained in:
@@ -13,8 +13,8 @@ export interface IHistoryNavigationWidget {
|
||||
|
||||
showNextValue(): void;
|
||||
|
||||
onDidFocus: Event<void>;
|
||||
readonly onDidFocus: Event<void>;
|
||||
|
||||
onDidBlur: Event<void>;
|
||||
readonly onDidBlur: Event<void>;
|
||||
|
||||
}
|
||||
|
||||
@@ -859,7 +859,7 @@ export interface IListAccessibilityProvider<T> extends IListViewAccessibilityPro
|
||||
getWidgetAriaLabel(): string | IObservable<string>;
|
||||
getWidgetRole?(): AriaRole;
|
||||
getAriaLevel?(element: T): number | undefined;
|
||||
onDidChangeActiveDescendant?: Event<void>;
|
||||
readonly onDidChangeActiveDescendant?: Event<void>;
|
||||
getActiveDescendantId?(element: T): string | undefined;
|
||||
}
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ export interface ITreeRenderer<T, TFilterData = void, TTemplateData = void> exte
|
||||
renderElement(element: ITreeNode<T, TFilterData>, index: number, templateData: TTemplateData, details?: ITreeElementRenderDetails): void;
|
||||
disposeElement?(element: ITreeNode<T, TFilterData>, index: number, templateData: TTemplateData, details?: ITreeElementRenderDetails): void;
|
||||
renderTwistie?(element: T, twistieElement: HTMLElement): boolean;
|
||||
onDidChangeTwistieState?: Event<T>;
|
||||
readonly onDidChangeTwistieState?: Event<T>;
|
||||
}
|
||||
|
||||
export interface ITreeEvent<T> {
|
||||
|
||||
@@ -15,7 +15,7 @@ export interface IHistory<T> {
|
||||
clear(): void;
|
||||
forEach(callbackfn: (value: T, value2: T, set: Set<T>) => void, thisArg?: any): void;
|
||||
replace?(t: T[]): void;
|
||||
onDidChange?: Event<string[]>;
|
||||
readonly onDidChange?: Event<string[]>;
|
||||
}
|
||||
|
||||
export class HistoryNavigator<T> implements INavigator<T> {
|
||||
|
||||
@@ -15,8 +15,8 @@ const INITIALIZE = '$initialize';
|
||||
|
||||
export interface IWebWorker extends IDisposable {
|
||||
getId(): number;
|
||||
onMessage: Event<Message>;
|
||||
onError: Event<unknown>;
|
||||
readonly onMessage: Event<Message>;
|
||||
readonly onError: Event<unknown>;
|
||||
postMessage(message: Message, transfer: ArrayBuffer[]): void;
|
||||
}
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@ interface IHandler {
|
||||
|
||||
export interface IMessagePassingProtocol {
|
||||
send(buffer: VSBuffer): void;
|
||||
onMessage: Event<VSBuffer>;
|
||||
readonly onMessage: Event<VSBuffer>;
|
||||
/**
|
||||
* Wait for the write buffer (if applicable) to become empty.
|
||||
*/
|
||||
@@ -784,7 +784,7 @@ export class ChannelClient implements IChannelClient, IDisposable {
|
||||
|
||||
export interface ClientConnectionEvent {
|
||||
protocol: IMessagePassingProtocol;
|
||||
onDidClientDisconnect: Event<void>;
|
||||
readonly onDidClientDisconnect: Event<void>;
|
||||
}
|
||||
|
||||
interface Connection<TContext> extends Client<TContext> {
|
||||
|
||||
@@ -108,7 +108,7 @@ interface ITestService {
|
||||
marshall(uri: URI): Promise<URI>;
|
||||
context(): Promise<unknown>;
|
||||
|
||||
onPong: Event<string>;
|
||||
readonly onPong: Event<string>;
|
||||
}
|
||||
|
||||
class TestService implements ITestService {
|
||||
|
||||
@@ -12,7 +12,7 @@ export interface IMarcoPoloEvent {
|
||||
}
|
||||
|
||||
export interface ITestService {
|
||||
onMarco: Event<IMarcoPoloEvent>;
|
||||
readonly onMarco: Event<IMarcoPoloEvent>;
|
||||
marco(): Promise<string>;
|
||||
pong(ping: string): Promise<{ incoming: string; outgoing: string }>;
|
||||
cancelMe(): Promise<boolean>;
|
||||
@@ -21,7 +21,7 @@ export interface ITestService {
|
||||
export class TestService implements ITestService {
|
||||
|
||||
private readonly _onMarco = new Emitter<IMarcoPoloEvent>();
|
||||
onMarco: Event<IMarcoPoloEvent> = this._onMarco.event;
|
||||
readonly onMarco: Event<IMarcoPoloEvent> = this._onMarco.event;
|
||||
|
||||
marco(): Promise<string> {
|
||||
this._onMarco.fire({ answer: 'polo' });
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace Samples {
|
||||
|
||||
private readonly _onDidChange = new Emitter<string>();
|
||||
|
||||
onDidChange: Event<string> = this._onDidChange.event;
|
||||
readonly onDidChange: Event<string> = this._onDidChange.event;
|
||||
|
||||
setText(value: string) {
|
||||
//...
|
||||
|
||||
@@ -281,7 +281,7 @@ export interface IOverlayWidget {
|
||||
/**
|
||||
* Event fired when the widget layout changes.
|
||||
*/
|
||||
onDidLayout?: Event<void>;
|
||||
readonly onDidLayout?: Event<void>;
|
||||
/**
|
||||
* Render this overlay widget in a location where it could overflow the editor's view dom node.
|
||||
*/
|
||||
@@ -898,14 +898,14 @@ export interface ICodeEditor extends editorCommon.IEditor {
|
||||
* @internal
|
||||
* @event
|
||||
*/
|
||||
onDidChangeLineHeight: Event<ModelLineHeightChangedEvent>;
|
||||
readonly onDidChangeLineHeight: Event<ModelLineHeightChangedEvent>;
|
||||
|
||||
/**
|
||||
* An event emitted when the font of the editor has changed.
|
||||
* @internal
|
||||
* @event
|
||||
*/
|
||||
onDidChangeFont: Event<ModelFontChangedEvent>;
|
||||
readonly onDidChangeFont: Event<ModelFontChangedEvent>;
|
||||
|
||||
/**
|
||||
* Get value of the current model attached to this editor.
|
||||
|
||||
@@ -21,7 +21,7 @@ export const IInlineCompletionsService = createDecorator<IInlineCompletionsServi
|
||||
export interface IInlineCompletionsService {
|
||||
readonly _serviceBrand: undefined;
|
||||
|
||||
onDidChangeIsSnoozing: Event<boolean>;
|
||||
readonly onDidChangeIsSnoozing: Event<boolean>;
|
||||
|
||||
/**
|
||||
* Get the remaining time (in ms) for which inline completions should be snoozed,
|
||||
|
||||
+1
-2
@@ -35,8 +35,7 @@ export class EditorMarkdownCodeBlockRenderer implements IMarkdownCodeBlockRender
|
||||
public async renderCodeBlock(languageAlias: string | undefined, value: string, options: IMarkdownRendererExtraOptions): Promise<HTMLElement> {
|
||||
const editor = isCodeEditor(options.context) ? options.context : undefined;
|
||||
|
||||
// In markdown,
|
||||
// it is possible that we stumble upon language aliases (e.g.js instead of javascript)
|
||||
// In markdown, it is possible that we stumble upon language aliases (e.g.js instead of javascript).
|
||||
// it is possible no alias is given in which case we fall back to the current editor lang
|
||||
let languageId: string | undefined | null;
|
||||
if (languageAlias) {
|
||||
|
||||
@@ -25,11 +25,11 @@ export interface IEditorConfiguration extends IDisposable {
|
||||
/**
|
||||
* The `options` have changed (quick event)
|
||||
*/
|
||||
onDidChangeFast: Event<ConfigurationChangedEvent>;
|
||||
readonly onDidChangeFast: Event<ConfigurationChangedEvent>;
|
||||
/**
|
||||
* The `options` have changed (slow event)
|
||||
*/
|
||||
onDidChange: Event<ConfigurationChangedEvent>;
|
||||
readonly onDidChange: Event<ConfigurationChangedEvent>;
|
||||
/**
|
||||
* Get the raw options as they were passed in to the editor
|
||||
* and merged with all calls to `updateOptions`.
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import { Emitter, Event } from '../../../base/common/event.js';
|
||||
|
||||
export interface IEditorZoom {
|
||||
onDidChangeZoomLevel: Event<number>;
|
||||
readonly onDidChangeZoomLevel: Event<number>;
|
||||
getZoomLevel(): number;
|
||||
setZoomLevel(zoomLevel: number): void;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ export interface IDocumentDiffProvider {
|
||||
* Is fired when settings of the diff algorithm change that could alter the result of the diffing computation.
|
||||
* Any user of this provider should recompute the diff when this event is fired.
|
||||
*/
|
||||
onDidChange: Event<void>;
|
||||
readonly onDidChange: Event<void>;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -546,7 +546,7 @@ export interface IEditorDecorationsCollection {
|
||||
* An event emitted when decorations change in the editor,
|
||||
* but the change is not caused by us setting or clearing the collection.
|
||||
*/
|
||||
onDidChange: Event<IModelDecorationsChangedEvent>;
|
||||
readonly onDidChange: Event<IModelDecorationsChangedEvent>;
|
||||
/**
|
||||
* Get the decorations count.
|
||||
*/
|
||||
|
||||
@@ -2143,7 +2143,7 @@ export interface CommentWidget {
|
||||
commentThread: CommentThread;
|
||||
comment?: Comment;
|
||||
input: string;
|
||||
onDidChangeInput: Event<string>;
|
||||
readonly onDidChangeInput: Event<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2173,19 +2173,19 @@ export interface CommentThread<T = IRange> {
|
||||
label: string | undefined;
|
||||
contextValue: string | undefined;
|
||||
comments: ReadonlyArray<Comment> | undefined;
|
||||
onDidChangeComments: Event<readonly Comment[] | undefined>;
|
||||
readonly onDidChangeComments: Event<readonly Comment[] | undefined>;
|
||||
collapsibleState?: CommentThreadCollapsibleState;
|
||||
initialCollapsibleState?: CommentThreadCollapsibleState;
|
||||
onDidChangeInitialCollapsibleState: Event<CommentThreadCollapsibleState | undefined>;
|
||||
readonly onDidChangeInitialCollapsibleState: Event<CommentThreadCollapsibleState | undefined>;
|
||||
state?: CommentThreadState;
|
||||
applicability?: CommentThreadApplicability;
|
||||
canReply: boolean | CommentAuthorInformation;
|
||||
input?: CommentInput;
|
||||
onDidChangeInput: Event<CommentInput | undefined>;
|
||||
onDidChangeLabel: Event<string | undefined>;
|
||||
onDidChangeCollapsibleState: Event<CommentThreadCollapsibleState | undefined>;
|
||||
onDidChangeState: Event<CommentThreadState | undefined>;
|
||||
onDidChangeCanReply: Event<boolean>;
|
||||
readonly onDidChangeInput: Event<CommentInput | undefined>;
|
||||
readonly onDidChangeLabel: Event<string | undefined>;
|
||||
readonly onDidChangeCollapsibleState: Event<CommentThreadCollapsibleState | undefined>;
|
||||
readonly onDidChangeState: Event<CommentThreadState | undefined>;
|
||||
readonly onDidChangeCanReply: Event<boolean>;
|
||||
isDisposed: boolean;
|
||||
isTemplate: boolean;
|
||||
}
|
||||
@@ -2384,14 +2384,14 @@ export interface SemanticTokensEdits {
|
||||
}
|
||||
|
||||
export interface DocumentSemanticTokensProvider {
|
||||
onDidChange?: Event<void>;
|
||||
readonly onDidChange?: Event<void>;
|
||||
getLegend(): SemanticTokensLegend;
|
||||
provideDocumentSemanticTokens(model: model.ITextModel, lastResultId: string | null, token: CancellationToken): ProviderResult<SemanticTokens | SemanticTokensEdits>;
|
||||
releaseDocumentSemanticTokens(resultId: string | undefined): void;
|
||||
}
|
||||
|
||||
export interface DocumentRangeSemanticTokensProvider {
|
||||
onDidChange?: Event<void>;
|
||||
readonly onDidChange?: Event<void>;
|
||||
getLegend(): SemanticTokensLegend;
|
||||
provideDocumentRangeSemanticTokens(model: model.ITextModel, range: Range, token: CancellationToken): ProviderResult<SemanticTokens>;
|
||||
}
|
||||
@@ -2448,7 +2448,7 @@ export interface ITokenizationRegistry<TSupport> {
|
||||
* - a tokenization support is registered, unregistered or changed.
|
||||
* - the color map is changed.
|
||||
*/
|
||||
onDidChange: Event<ITokenizationSupportChangedEvent>;
|
||||
readonly onDidChange: Event<ITokenizationSupportChangedEvent>;
|
||||
|
||||
/**
|
||||
* Fire a change event for a language.
|
||||
|
||||
@@ -57,7 +57,7 @@ export interface ILanguageService {
|
||||
* **Note**: Basic language features refers to language configuration related features.
|
||||
* **Note**: This event is a superset of `onDidRequestRichLanguageFeatures`
|
||||
*/
|
||||
onDidRequestBasicLanguageFeatures: Event<string>;
|
||||
readonly onDidRequestBasicLanguageFeatures: Event<string>;
|
||||
|
||||
/**
|
||||
* An event emitted when rich language features are requested for the first time.
|
||||
@@ -66,12 +66,12 @@ export interface ILanguageService {
|
||||
* **Note**: Rich language features refers to tokenizers, language features based on providers, etc.
|
||||
* **Note**: This event is a subset of `onDidRequestRichLanguageFeatures`
|
||||
*/
|
||||
onDidRequestRichLanguageFeatures: Event<string>;
|
||||
readonly onDidRequestRichLanguageFeatures: Event<string>;
|
||||
|
||||
/**
|
||||
* An event emitted when languages have changed.
|
||||
*/
|
||||
onDidChange: Event<void>;
|
||||
readonly onDidChange: Event<void>;
|
||||
|
||||
/**
|
||||
* Register a language.
|
||||
|
||||
@@ -35,7 +35,7 @@ export interface ICommentsConfiguration {
|
||||
export interface ILanguageConfigurationService {
|
||||
readonly _serviceBrand: undefined;
|
||||
|
||||
onDidChange: Event<LanguageConfigurationServiceChangeEvent>;
|
||||
readonly onDidChange: Event<LanguageConfigurationServiceChangeEvent>;
|
||||
|
||||
/**
|
||||
* @param priority Use a higher number for higher priority
|
||||
|
||||
@@ -1503,7 +1503,7 @@ export class ValidAnnotatedEditOperation implements IIdentifiedSingleEditOperati
|
||||
* `lineNumber` is 1 based.
|
||||
*/
|
||||
export interface IReadonlyTextBuffer {
|
||||
onDidChangeContent: Event<void>;
|
||||
readonly onDidChangeContent: Event<void>;
|
||||
equals(other: ITextBuffer): boolean;
|
||||
mightContainRTL(): boolean;
|
||||
mightContainUnusualLineTerminators(): boolean;
|
||||
|
||||
@@ -25,5 +25,5 @@ export interface DecorationProvider {
|
||||
*/
|
||||
getAllDecorations(ownerId?: number, filterOutValidation?: boolean, onlyMinimapDecorations?: boolean): IModelDecoration[];
|
||||
|
||||
onDidChange: Event<void>;
|
||||
readonly onDidChange: Event<void>;
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ export const IMarkerDecorationsService = createDecorator<IMarkerDecorationsServi
|
||||
export interface IMarkerDecorationsService {
|
||||
readonly _serviceBrand: undefined;
|
||||
|
||||
onDidChangeMarker: Event<ITextModel>;
|
||||
readonly onDidChangeMarker: Event<ITextModel>;
|
||||
|
||||
getMarker(uri: URI, decoration: IModelDecoration): IMarker | null;
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ export interface ITextResourceConfigurationService {
|
||||
/**
|
||||
* Event that fires when the configuration changes.
|
||||
*/
|
||||
onDidChangeConfiguration: Event<ITextResourceConfigurationChangeEvent>;
|
||||
readonly onDidChangeConfiguration: Event<ITextResourceConfigurationChangeEvent>;
|
||||
|
||||
/**
|
||||
* Fetches the value of the section for the given resource by applying language overrides.
|
||||
|
||||
@@ -14,7 +14,7 @@ export interface IBracketPairsTextModelPart {
|
||||
/**
|
||||
* Is fired when bracket pairs change, either due to a text or a settings change.
|
||||
*/
|
||||
onDidChange: Event<void>;
|
||||
readonly onDidChange: Event<void>;
|
||||
|
||||
/**
|
||||
* Gets all bracket pairs that intersect the given position.
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ export enum InlineEditTabAction {
|
||||
export interface IInlineEditsView {
|
||||
isHovered: IObservable<boolean>;
|
||||
minEditorScrollHeight?: IObservable<number>;
|
||||
onDidClick: Event<IMouseEvent>;
|
||||
readonly onDidClick: Event<IMouseEvent>;
|
||||
}
|
||||
|
||||
export interface IInlineEditHost {
|
||||
|
||||
@@ -44,7 +44,7 @@ export interface IStickyScrollController {
|
||||
findScrollWidgetState(): StickyScrollWidgetState;
|
||||
dispose(): void;
|
||||
selectEditor(): void;
|
||||
onDidChangeStickyScrollHeight: Event<{ height: number }>;
|
||||
readonly onDidChangeStickyScrollHeight: Event<{ height: number }>;
|
||||
}
|
||||
|
||||
export class StickyScrollController extends Disposable implements IEditorContribution, IStickyScrollController {
|
||||
|
||||
@@ -50,7 +50,7 @@ export interface IStickyLineCandidateProvider {
|
||||
/**
|
||||
* Event triggered when sticky scroll changes.
|
||||
*/
|
||||
onDidChangeStickyScroll: Event<void>;
|
||||
readonly onDidChangeStickyScroll: Event<void>;
|
||||
}
|
||||
|
||||
export class StickyLineCandidateProvider extends Disposable implements IStickyLineCandidateProvider {
|
||||
|
||||
@@ -1009,7 +1009,7 @@ class StandaloneWorkspaceTrustManagementService implements IWorkspaceTrustManage
|
||||
|
||||
private _neverEmitter = new Emitter<never>();
|
||||
public readonly onDidChangeTrust: Event<boolean> = this._neverEmitter.event;
|
||||
onDidChangeTrustedFolders: Event<void> = this._neverEmitter.event;
|
||||
readonly onDidChangeTrustedFolders: Event<void> = this._neverEmitter.event;
|
||||
public readonly workspaceResolved = Promise.resolve();
|
||||
public readonly workspaceTrustInitialized = Promise.resolve();
|
||||
public readonly acceptsOutOfWorkspaceFiles = true;
|
||||
|
||||
@@ -29,5 +29,5 @@ class SyncDocumentDiffProvider implements IDocumentDiffProvider {
|
||||
});
|
||||
}
|
||||
|
||||
onDidChange: Event<void> = () => toDisposable(() => { });
|
||||
readonly onDidChange: Event<void> = () => toDisposable(() => { });
|
||||
}
|
||||
|
||||
Vendored
+5
-5
@@ -2880,7 +2880,7 @@ declare namespace monaco.editor {
|
||||
* An event emitted when decorations change in the editor,
|
||||
* but the change is not caused by us setting or clearing the collection.
|
||||
*/
|
||||
onDidChange: IEvent<IModelDecorationsChangedEvent>;
|
||||
readonly onDidChange: IEvent<IModelDecorationsChangedEvent>;
|
||||
/**
|
||||
* Get the decorations count.
|
||||
*/
|
||||
@@ -5687,7 +5687,7 @@ declare namespace monaco.editor {
|
||||
/**
|
||||
* Event fired when the widget layout changes.
|
||||
*/
|
||||
onDidLayout?: IEvent<void>;
|
||||
readonly onDidLayout?: IEvent<void>;
|
||||
/**
|
||||
* Render this overlay widget in a location where it could overflow the editor's view dom node.
|
||||
*/
|
||||
@@ -6505,7 +6505,7 @@ declare namespace monaco.editor {
|
||||
export const EditorZoom: IEditorZoom;
|
||||
|
||||
export interface IEditorZoom {
|
||||
onDidChangeZoomLevel: IEvent<number>;
|
||||
readonly onDidChangeZoomLevel: IEvent<number>;
|
||||
getZoomLevel(): number;
|
||||
setZoomLevel(zoomLevel: number): void;
|
||||
}
|
||||
@@ -8492,14 +8492,14 @@ declare namespace monaco.languages {
|
||||
}
|
||||
|
||||
export interface DocumentSemanticTokensProvider {
|
||||
onDidChange?: IEvent<void>;
|
||||
readonly onDidChange?: IEvent<void>;
|
||||
getLegend(): SemanticTokensLegend;
|
||||
provideDocumentSemanticTokens(model: editor.ITextModel, lastResultId: string | null, token: CancellationToken): ProviderResult<SemanticTokens | SemanticTokensEdits>;
|
||||
releaseDocumentSemanticTokens(resultId: string | undefined): void;
|
||||
}
|
||||
|
||||
export interface DocumentRangeSemanticTokensProvider {
|
||||
onDidChange?: IEvent<void>;
|
||||
readonly onDidChange?: IEvent<void>;
|
||||
getLegend(): SemanticTokensLegend;
|
||||
provideDocumentRangeSemanticTokens(model: editor.ITextModel, range: Range, token: CancellationToken): ProviderResult<SemanticTokens>;
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ export interface IAccessibleViewContentProvider extends IBasicContentProvider, I
|
||||
/**
|
||||
* Note that this will only take effect if the provider has an ID.
|
||||
*/
|
||||
onDidRequestClearLastProvider?: Event<AccessibleViewProviderId>;
|
||||
readonly onDidRequestClearLastProvider?: Event<AccessibleViewProviderId>;
|
||||
}
|
||||
|
||||
|
||||
@@ -201,5 +201,5 @@ export interface IBasicContentProvider extends IDisposable {
|
||||
actions?: IAction[];
|
||||
providePreviousContent?(): void;
|
||||
provideNextContent?(): void;
|
||||
onDidChangeContent?: Event<void>;
|
||||
readonly onDidChangeContent?: Event<void>;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ export interface IActionViewItemService {
|
||||
|
||||
_serviceBrand: undefined;
|
||||
|
||||
onDidChange: Event<MenuId>;
|
||||
readonly onDidChange: Event<MenuId>;
|
||||
|
||||
register(menu: MenuId, submenu: MenuId, provider: IActionViewItemFactory, event?: Event<unknown>): IDisposable;
|
||||
register(menu: MenuId, commandId: string, provider: IActionViewItemFactory, event?: Event<unknown>): IDisposable;
|
||||
@@ -36,7 +36,7 @@ export interface IActionViewItemService {
|
||||
export class NullActionViewItemService implements IActionViewItemService {
|
||||
_serviceBrand: undefined;
|
||||
|
||||
onDidChange: Event<MenuId> = Event.None;
|
||||
readonly onDidChange: Event<MenuId> = Event.None;
|
||||
|
||||
register(menu: MenuId, commandId: string | MenuId, provider: IActionViewItemFactory, event?: Event<unknown>): IDisposable {
|
||||
return Disposable.None;
|
||||
|
||||
@@ -58,7 +58,7 @@ export interface ICommandMetadata {
|
||||
}
|
||||
|
||||
export interface ICommandRegistry {
|
||||
onDidRegisterCommand: Event<string>;
|
||||
readonly onDidRegisterCommand: Event<string>;
|
||||
registerCommand(id: string, command: ICommandHandler): IDisposable;
|
||||
registerCommand(command: ICommand): IDisposable;
|
||||
registerCommandAlias(oldId: string, newId: string): IDisposable;
|
||||
|
||||
@@ -150,7 +150,7 @@ export interface IConfigurationUpdateOptions {
|
||||
export interface IConfigurationService {
|
||||
readonly _serviceBrand: undefined;
|
||||
|
||||
onDidChangeConfiguration: Event<IConfigurationChangeEvent>;
|
||||
readonly onDidChangeConfiguration: Event<IConfigurationChangeEvent>;
|
||||
|
||||
getConfigurationData(): IConfigurationData | null;
|
||||
|
||||
|
||||
@@ -2054,7 +2054,7 @@ export type IScopedContextKeyService = IContextKeyService & IDisposable;
|
||||
export interface IContextKeyService {
|
||||
readonly _serviceBrand: undefined;
|
||||
|
||||
onDidChangeContext: Event<IContextKeyChangeEvent>;
|
||||
readonly onDidChangeContext: Event<IContextKeyChangeEvent>;
|
||||
bufferChangeEvents(callback: Function): void;
|
||||
|
||||
createKey<T extends ContextKeyValue>(key: string, defaultValue: T | undefined): IContextKey<T>;
|
||||
|
||||
@@ -456,12 +456,12 @@ export interface IDialogService {
|
||||
/**
|
||||
* An event that fires when a dialog is about to show.
|
||||
*/
|
||||
onWillShowDialog: Event<void>;
|
||||
readonly onWillShowDialog: Event<void>;
|
||||
|
||||
/**
|
||||
* An event that fires when a dialog did show (closed).
|
||||
*/
|
||||
onDidShowDialog: Event<void>;
|
||||
readonly onDidShowDialog: Event<void>;
|
||||
|
||||
/**
|
||||
* Ask the user for confirmation with a modal dialog.
|
||||
|
||||
@@ -46,11 +46,11 @@ function transformOutgoingExtension(extension: ILocalExtension, transformer: IUR
|
||||
|
||||
export class ExtensionManagementChannel implements IServerChannel {
|
||||
|
||||
onInstallExtension: Event<InstallExtensionEvent>;
|
||||
onDidInstallExtensions: Event<readonly InstallExtensionResult[]>;
|
||||
onUninstallExtension: Event<UninstallExtensionEvent>;
|
||||
onDidUninstallExtension: Event<DidUninstallExtensionEvent>;
|
||||
onDidUpdateExtensionMetadata: Event<DidUpdateExtensionMetadata>;
|
||||
readonly onInstallExtension: Event<InstallExtensionEvent>;
|
||||
readonly onDidInstallExtensions: Event<readonly InstallExtensionResult[]>;
|
||||
readonly onUninstallExtension: Event<UninstallExtensionEvent>;
|
||||
readonly onDidUninstallExtension: Event<DidUninstallExtensionEvent>;
|
||||
readonly onDidUpdateExtensionMetadata: Event<DidUpdateExtensionMetadata>;
|
||||
|
||||
constructor(private service: IExtensionManagementService, private getUriTransformer: (requestContext: any) => IURITransformer | null) {
|
||||
this.onInstallExtension = Event.buffer(service.onInstallExtension, true);
|
||||
|
||||
@@ -467,7 +467,7 @@ suite('Instantiation Service', () => {
|
||||
const A = createDecorator<A>('A');
|
||||
interface A {
|
||||
_serviceBrand: undefined;
|
||||
onDidDoIt: Event<any>;
|
||||
readonly onDidDoIt: Event<any>;
|
||||
doIt(): void;
|
||||
}
|
||||
|
||||
@@ -477,7 +477,7 @@ suite('Instantiation Service', () => {
|
||||
_doIt = 0;
|
||||
|
||||
_onDidDoIt = new Emitter<this>();
|
||||
onDidDoIt: Event<this> = this._onDidDoIt.event;
|
||||
readonly onDidDoIt: Event<this> = this._onDidDoIt.event;
|
||||
|
||||
constructor() {
|
||||
created = true;
|
||||
@@ -531,7 +531,7 @@ suite('Instantiation Service', () => {
|
||||
const A = createDecorator<A>('A');
|
||||
interface A {
|
||||
_serviceBrand: undefined;
|
||||
onDidDoIt: Event<any>;
|
||||
readonly onDidDoIt: Event<any>;
|
||||
doIt(): void;
|
||||
noop(): void;
|
||||
}
|
||||
@@ -542,7 +542,7 @@ suite('Instantiation Service', () => {
|
||||
_doIt = 0;
|
||||
|
||||
_onDidDoIt = new Emitter<this>();
|
||||
onDidDoIt: Event<this> = this._onDidDoIt.event;
|
||||
readonly onDidDoIt: Event<this> = this._onDidDoIt.event;
|
||||
|
||||
constructor() {
|
||||
created = true;
|
||||
@@ -599,7 +599,7 @@ suite('Instantiation Service', () => {
|
||||
const A = createDecorator<A>('A');
|
||||
interface A {
|
||||
_serviceBrand: undefined;
|
||||
onDidDoIt: Event<any>;
|
||||
readonly onDidDoIt: Event<any>;
|
||||
doIt(): void;
|
||||
}
|
||||
let created = false;
|
||||
@@ -608,7 +608,7 @@ suite('Instantiation Service', () => {
|
||||
_doIt = 0;
|
||||
|
||||
_onDidDoIt = new Emitter<this>();
|
||||
onDidDoIt: Event<this> = this._onDidDoIt.event;
|
||||
readonly onDidDoIt: Event<this> = this._onDidDoIt.event;
|
||||
|
||||
constructor() {
|
||||
created = true;
|
||||
|
||||
@@ -45,7 +45,7 @@ export interface IKeybindingService {
|
||||
|
||||
readonly inChordMode: boolean;
|
||||
|
||||
onDidUpdateKeybindings: Event<void>;
|
||||
readonly onDidUpdateKeybindings: Event<void>;
|
||||
|
||||
/**
|
||||
* Returns none, one or many (depending on keyboard layout)!
|
||||
|
||||
@@ -30,7 +30,7 @@ export interface ILabelService {
|
||||
getSeparator(scheme: string, authority?: string): '/' | '\\';
|
||||
|
||||
registerFormatter(formatter: ResourceLabelFormatter): IDisposable;
|
||||
onDidChangeFormatters: Event<IFormatterChangeEvent>;
|
||||
readonly onDidChangeFormatters: Event<IFormatterChangeEvent>;
|
||||
|
||||
/**
|
||||
* Registers a formatter that's cached for the machine beyond the lifecycle
|
||||
|
||||
@@ -41,7 +41,7 @@ export enum LogLevel {
|
||||
export const DEFAULT_LOG_LEVEL: LogLevel = LogLevel.Info;
|
||||
|
||||
export interface ILogger extends IDisposable {
|
||||
onDidChangeLogLevel: Event<LogLevel>;
|
||||
readonly onDidChangeLogLevel: Event<LogLevel>;
|
||||
getLevel(): LogLevel;
|
||||
setLevel(level: LogLevel): void;
|
||||
|
||||
|
||||
@@ -121,9 +121,9 @@ export interface QuickInputUI {
|
||||
progressBar: ProgressBar;
|
||||
list: QuickInputList;
|
||||
tree: QuickInputTreeController;
|
||||
onDidAccept: Event<void>;
|
||||
onDidCustom: Event<void>;
|
||||
onDidTriggerButton: Event<IQuickInputButton>;
|
||||
readonly onDidAccept: Event<void>;
|
||||
readonly onDidCustom: Event<void>;
|
||||
readonly onDidTriggerButton: Event<IQuickInputButton>;
|
||||
ignoreFocusOut: boolean;
|
||||
keyMods: Writeable<IKeyMods>;
|
||||
show(controller: QuickInput): void;
|
||||
|
||||
@@ -674,16 +674,16 @@ export class QuickInputList extends Disposable {
|
||||
readonly onLeave: Event<void> = this._onLeave.event;
|
||||
|
||||
private readonly _visibleCountObservable = observableValue('VisibleCount', 0);
|
||||
onChangedVisibleCount: Event<number> = Event.fromObservable(this._visibleCountObservable, this._store);
|
||||
readonly onChangedVisibleCount: Event<number> = Event.fromObservable(this._visibleCountObservable, this._store);
|
||||
|
||||
private readonly _allVisibleCheckedObservable = observableValue('AllVisibleChecked', false);
|
||||
onChangedAllVisibleChecked: Event<boolean> = Event.fromObservable(this._allVisibleCheckedObservable, this._store);
|
||||
readonly onChangedAllVisibleChecked: Event<boolean> = Event.fromObservable(this._allVisibleCheckedObservable, this._store);
|
||||
|
||||
private readonly _checkedCountObservable = observableValue('CheckedCount', 0);
|
||||
onChangedCheckedCount: Event<number> = Event.fromObservable(this._checkedCountObservable, this._store);
|
||||
readonly onChangedCheckedCount: Event<number> = Event.fromObservable(this._checkedCountObservable, this._store);
|
||||
|
||||
private readonly _checkedElementsObservable = observableValueOpts({ equalsFn: equals }, new Array<IQuickPickItem>());
|
||||
onChangedCheckedElements: Event<IQuickPickItem[]> = Event.fromObservable(this._checkedElementsObservable, this._store);
|
||||
readonly onChangedCheckedElements: Event<IQuickPickItem[]> = Event.fromObservable(this._checkedElementsObservable, this._store);
|
||||
|
||||
private readonly _onButtonTriggered = new Emitter<IQuickPickItemButtonEvent<IQuickPickItem>>();
|
||||
onButtonTriggered = this._onButtonTriggered.event;
|
||||
|
||||
@@ -29,7 +29,7 @@ export class QuickTree<T extends IQuickTreeItem> extends QuickInput implements I
|
||||
readonly onDidChangeActive = Event.fromObservable(this._activeItems, this._store);
|
||||
|
||||
private readonly _onDidChangeCheckedLeafItems = new Emitter<T[]>();
|
||||
onDidChangeCheckedLeafItems: Event<T[]> = this._onDidChangeCheckedLeafItems.event;
|
||||
readonly onDidChangeCheckedLeafItems: Event<T[]> = this._onDidChangeCheckedLeafItems.event;
|
||||
|
||||
readonly onDidAccept: Event<void>;
|
||||
|
||||
|
||||
@@ -702,7 +702,7 @@ export interface IQuickInputToggle {
|
||||
* Event that is fired when the toggle value changes.
|
||||
* The boolean value indicates whether the change was triggered via keyboard.
|
||||
*/
|
||||
onChange: Event<boolean>;
|
||||
readonly onChange: Event<boolean>;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -24,7 +24,7 @@ export interface ISecretStorageProvider {
|
||||
|
||||
export interface ISecretStorageService extends ISecretStorageProvider {
|
||||
readonly _serviceBrand: undefined;
|
||||
onDidChangeSecret: Event<string>;
|
||||
readonly onDidChangeSecret: Event<string>;
|
||||
}
|
||||
|
||||
export class BaseSecretStorageService extends Disposable implements ISecretStorageService {
|
||||
@@ -33,7 +33,7 @@ export class BaseSecretStorageService extends Disposable implements ISecretStora
|
||||
private readonly _storagePrefix = 'secret://';
|
||||
|
||||
protected readonly onDidChangeSecretEmitter = this._register(new Emitter<string>());
|
||||
onDidChangeSecret: Event<string> = this.onDidChangeSecretEmitter.event;
|
||||
readonly onDidChangeSecret: Event<string> = this.onDidChangeSecretEmitter.event;
|
||||
|
||||
protected readonly _sequencer = new SequencerByKey<string>();
|
||||
|
||||
|
||||
@@ -187,7 +187,7 @@ export interface ICommandInvalidationRequest {
|
||||
export interface IBufferMarkCapability {
|
||||
type: TerminalCapability.BufferMarkDetection;
|
||||
markers(): IterableIterator<IMarker>;
|
||||
onMarkAdded: Event<IMarkProperties>;
|
||||
readonly onMarkAdded: Event<IMarkProperties>;
|
||||
addMark(properties?: IMarkProperties): void;
|
||||
getMark(id: string): IMarker | undefined;
|
||||
}
|
||||
|
||||
@@ -760,12 +760,12 @@ export interface ITerminalChildProcess {
|
||||
*/
|
||||
shouldPersist: boolean;
|
||||
|
||||
onProcessData: Event<IProcessDataEvent | string>;
|
||||
onProcessReady: Event<IProcessReadyEvent>;
|
||||
onProcessReplayComplete?: Event<void>;
|
||||
onDidChangeProperty: Event<IProcessProperty<any>>;
|
||||
onProcessExit: Event<number | undefined>;
|
||||
onRestoreCommands?: Event<ISerializedCommandDetectionCapability>;
|
||||
readonly onProcessData: Event<IProcessDataEvent | string>;
|
||||
readonly onProcessReady: Event<IProcessReadyEvent>;
|
||||
readonly onProcessReplayComplete?: Event<void>;
|
||||
readonly onDidChangeProperty: Event<IProcessProperty<any>>;
|
||||
readonly onProcessExit: Event<number | undefined>;
|
||||
readonly onRestoreCommands?: Event<ISerializedCommandDetectionCapability>;
|
||||
|
||||
/**
|
||||
* Starts the process.
|
||||
@@ -1109,19 +1109,19 @@ export interface ITerminalBackend extends ITerminalBackendPtyServiceContribution
|
||||
* Fired when the ptyHost process becomes non-responsive, this should disable stdin for all
|
||||
* terminals using this pty host connection and mark them as disconnected.
|
||||
*/
|
||||
onPtyHostUnresponsive: Event<void>;
|
||||
readonly onPtyHostUnresponsive: Event<void>;
|
||||
/**
|
||||
* Fired when the ptyHost process becomes responsive after being non-responsive. Allowing
|
||||
* previously disconnected terminals to reconnect.
|
||||
*/
|
||||
onPtyHostResponsive: Event<void>;
|
||||
readonly onPtyHostResponsive: Event<void>;
|
||||
/**
|
||||
* Fired when the ptyHost has been restarted, this is used as a signal for listening terminals
|
||||
* that its pty has been lost and will remain disconnected.
|
||||
*/
|
||||
onPtyHostRestart: Event<void>;
|
||||
readonly onPtyHostRestart: Event<void>;
|
||||
|
||||
onDidRequestDetach: Event<{ requestId: number; workspaceId: string; instanceId: number }>;
|
||||
readonly onDidRequestDetach: Event<{ requestId: number; workspaceId: string; instanceId: number }>;
|
||||
|
||||
attachToProcess(id: number): Promise<ITerminalChildProcess | undefined>;
|
||||
attachToRevivedProcess(id: number): Promise<ITerminalChildProcess | undefined>;
|
||||
|
||||
@@ -14,8 +14,8 @@ export interface IPtyHostConnection {
|
||||
}
|
||||
|
||||
export interface IPtyHostStarter extends IDisposable {
|
||||
onRequestConnection?: Event<void>;
|
||||
onWillShutdown?: Event<void>;
|
||||
readonly onRequestConnection?: Event<void>;
|
||||
readonly onWillShutdown?: Event<void>;
|
||||
|
||||
/**
|
||||
* Creates a pty host and connects to it.
|
||||
|
||||
@@ -107,7 +107,7 @@ export interface ITunnel {
|
||||
/**
|
||||
* Implementers of Tunnel should fire onDidDispose when dispose is called.
|
||||
*/
|
||||
onDidDispose: Event<void>;
|
||||
readonly onDidDispose: Event<void>;
|
||||
|
||||
dispose(): Promise<void> | void;
|
||||
}
|
||||
@@ -202,7 +202,7 @@ export function isPortPrivileged(port: number, host: string, os: OperatingSystem
|
||||
|
||||
export class DisposableTunnel {
|
||||
private _onDispose: Emitter<void> = new Emitter();
|
||||
onDidDispose: Event<void> = this._onDispose.event;
|
||||
readonly onDidDispose: Event<void> = this._onDispose.event;
|
||||
|
||||
constructor(
|
||||
public readonly remoteAddress: { port: number; host: string },
|
||||
|
||||
@@ -33,7 +33,7 @@ export interface FoundInFrameResult {
|
||||
export interface IWebviewManagerService {
|
||||
_serviceBrand: unknown;
|
||||
|
||||
onFoundInFrame: Event<FoundInFrameResult>;
|
||||
readonly onFoundInFrame: Event<FoundInFrameResult>;
|
||||
|
||||
setIgnoreMenuShortcuts(id: WebviewWebContentsId | WebviewWindowId, enabled: boolean): Promise<void>;
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@ export class ActiveWindowManager extends Disposable {
|
||||
private activeWindowId: number | undefined;
|
||||
|
||||
constructor({ onDidOpenMainWindow, onDidFocusMainWindow, getActiveWindowId }: {
|
||||
onDidOpenMainWindow: Event<number>;
|
||||
onDidFocusMainWindow: Event<number>;
|
||||
readonly onDidOpenMainWindow: Event<number>;
|
||||
readonly onDidFocusMainWindow: Event<number>;
|
||||
getActiveWindowId(): Promise<number | undefined>;
|
||||
}) {
|
||||
super();
|
||||
|
||||
@@ -34,15 +34,15 @@ suite('WindowsFinder', () => {
|
||||
|
||||
function createTestCodeWindow(options: { lastFocusTime: number; openedFolderUri?: URI; openedWorkspace?: IWorkspaceIdentifier }): ICodeWindow {
|
||||
return new class implements ICodeWindow {
|
||||
onWillLoad: Event<ILoadEvent> = Event.None;
|
||||
readonly onWillLoad: Event<ILoadEvent> = Event.None;
|
||||
onDidMaximize = Event.None;
|
||||
onDidUnmaximize = Event.None;
|
||||
onDidTriggerSystemContextMenu: Event<{ x: number; y: number }> = Event.None;
|
||||
onDidSignalReady: Event<void> = Event.None;
|
||||
onDidClose: Event<void> = Event.None;
|
||||
onDidDestroy: Event<void> = Event.None;
|
||||
onDidEnterFullScreen: Event<void> = Event.None;
|
||||
onDidLeaveFullScreen: Event<void> = Event.None;
|
||||
readonly onDidTriggerSystemContextMenu: Event<{ x: number; y: number }> = Event.None;
|
||||
readonly onDidSignalReady: Event<void> = Event.None;
|
||||
readonly onDidClose: Event<void> = Event.None;
|
||||
readonly onDidDestroy: Event<void> = Event.None;
|
||||
readonly onDidEnterFullScreen: Event<void> = Event.None;
|
||||
readonly onDidLeaveFullScreen: Event<void> = Event.None;
|
||||
whenClosedOrLoaded: Promise<void> = Promise.resolve();
|
||||
id: number = -1;
|
||||
win: Electron.BrowserWindow = null!;
|
||||
|
||||
@@ -36,8 +36,8 @@ export const IWorkspaceTrustManagementService = createDecorator<IWorkspaceTrustM
|
||||
export interface IWorkspaceTrustManagementService {
|
||||
readonly _serviceBrand: undefined;
|
||||
|
||||
onDidChangeTrust: Event<boolean>;
|
||||
onDidChangeTrustedFolders: Event<void>;
|
||||
readonly onDidChangeTrust: Event<boolean>;
|
||||
readonly onDidChangeTrustedFolders: Event<void>;
|
||||
|
||||
readonly workspaceResolved: Promise<void>;
|
||||
readonly workspaceTrustInitialized: Promise<void>;
|
||||
|
||||
@@ -237,7 +237,7 @@ class LanguageModelAccessAuthProvider implements IAuthenticationProvider {
|
||||
|
||||
// Important for updating the UI
|
||||
private _onDidChangeSessions: Emitter<AuthenticationSessionsChangeEvent> = new Emitter<AuthenticationSessionsChangeEvent>();
|
||||
onDidChangeSessions: Event<AuthenticationSessionsChangeEvent> = this._onDidChangeSessions.event;
|
||||
readonly onDidChangeSessions: Event<AuthenticationSessionsChangeEvent> = this._onDidChangeSessions.event;
|
||||
|
||||
private _session: AuthenticationSession | undefined;
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ export const enum StatusBarUpdateKind {
|
||||
export interface IExtensionStatusBarItemService {
|
||||
readonly _serviceBrand: undefined;
|
||||
|
||||
onDidChange: Event<IExtensionStatusBarItemChangeEvent>;
|
||||
readonly onDidChange: Event<IExtensionStatusBarItemChangeEvent>;
|
||||
|
||||
setOrUpdateEntry(id: string, statusId: string, extensionId: string | undefined, name: string, text: string, tooltip: IMarkdownString | string | undefined | IManagedHoverTooltipMarkdownString, command: Command | undefined, color: string | ThemeColor | undefined, backgroundColor: ThemeColor | undefined, alignLeft: boolean, priority: number | undefined, accessibilityInformation: IAccessibilityInformation | undefined): StatusBarUpdateKind;
|
||||
|
||||
|
||||
@@ -38,15 +38,15 @@ export interface IExtHostDebugService extends ExtHostDebugServiceShape {
|
||||
|
||||
readonly _serviceBrand: undefined;
|
||||
|
||||
onDidStartDebugSession: Event<vscode.DebugSession>;
|
||||
onDidTerminateDebugSession: Event<vscode.DebugSession>;
|
||||
onDidChangeActiveDebugSession: Event<vscode.DebugSession | undefined>;
|
||||
readonly onDidStartDebugSession: Event<vscode.DebugSession>;
|
||||
readonly onDidTerminateDebugSession: Event<vscode.DebugSession>;
|
||||
readonly onDidChangeActiveDebugSession: Event<vscode.DebugSession | undefined>;
|
||||
activeDebugSession: vscode.DebugSession | undefined;
|
||||
activeDebugConsole: vscode.DebugConsole;
|
||||
onDidReceiveDebugSessionCustomEvent: Event<vscode.DebugSessionCustomEvent>;
|
||||
onDidChangeBreakpoints: Event<vscode.BreakpointsChangeEvent>;
|
||||
readonly onDidReceiveDebugSessionCustomEvent: Event<vscode.DebugSessionCustomEvent>;
|
||||
readonly onDidChangeBreakpoints: Event<vscode.BreakpointsChangeEvent>;
|
||||
breakpoints: vscode.Breakpoint[];
|
||||
onDidChangeActiveStackItem: Event<vscode.DebugThread | vscode.DebugStackFrame | undefined>;
|
||||
readonly onDidChangeActiveStackItem: Event<vscode.DebugThread | vscode.DebugStackFrame | undefined>;
|
||||
activeStackItem: vscode.DebugThread | vscode.DebugStackFrame | undefined;
|
||||
|
||||
addBreakpoints(breakpoints0: readonly vscode.Breakpoint[]): Promise<void>;
|
||||
|
||||
@@ -1162,7 +1162,7 @@ export interface IExtHostExtensionService extends AbstractExtHostExtensionServic
|
||||
registerRemoteAuthorityResolver(authorityPrefix: string, resolver: vscode.RemoteAuthorityResolver): vscode.Disposable;
|
||||
getRemoteExecServer(authority: string): Promise<vscode.ExecServer | undefined>;
|
||||
|
||||
onDidChangeRemoteConnectionData: Event<void>;
|
||||
readonly onDidChangeRemoteConnectionData: Event<void>;
|
||||
getRemoteConnectionData(): IRemoteConnectionData | null;
|
||||
}
|
||||
|
||||
|
||||
@@ -65,9 +65,9 @@ export class ExtHostNotebookController implements ExtHostNotebookShape {
|
||||
}
|
||||
|
||||
private _onDidOpenNotebookDocument = new Emitter<vscode.NotebookDocument>();
|
||||
onDidOpenNotebookDocument: Event<vscode.NotebookDocument> = this._onDidOpenNotebookDocument.event;
|
||||
readonly onDidOpenNotebookDocument: Event<vscode.NotebookDocument> = this._onDidOpenNotebookDocument.event;
|
||||
private _onDidCloseNotebookDocument = new Emitter<vscode.NotebookDocument>();
|
||||
onDidCloseNotebookDocument: Event<vscode.NotebookDocument> = this._onDidCloseNotebookDocument.event;
|
||||
readonly onDidCloseNotebookDocument: Event<vscode.NotebookDocument> = this._onDidCloseNotebookDocument.event;
|
||||
|
||||
private _onDidChangeVisibleNotebookEditors = new Emitter<vscode.NotebookEditor[]>();
|
||||
onDidChangeVisibleNotebookEditors = this._onDidChangeVisibleNotebookEditors.event;
|
||||
|
||||
@@ -36,12 +36,12 @@ export interface IExtHostTask extends ExtHostTaskShape {
|
||||
readonly _serviceBrand: undefined;
|
||||
|
||||
taskExecutions: vscode.TaskExecution[];
|
||||
onDidStartTask: Event<vscode.TaskStartEvent>;
|
||||
onDidEndTask: Event<vscode.TaskEndEvent>;
|
||||
onDidStartTaskProcess: Event<vscode.TaskProcessStartEvent>;
|
||||
onDidEndTaskProcess: Event<vscode.TaskProcessEndEvent>;
|
||||
onDidStartTaskProblemMatchers: Event<vscode.TaskProblemMatcherStartedEvent>;
|
||||
onDidEndTaskProblemMatchers: Event<vscode.TaskProblemMatcherEndedEvent>;
|
||||
readonly onDidStartTask: Event<vscode.TaskStartEvent>;
|
||||
readonly onDidEndTask: Event<vscode.TaskEndEvent>;
|
||||
readonly onDidStartTaskProcess: Event<vscode.TaskProcessStartEvent>;
|
||||
readonly onDidEndTaskProcess: Event<vscode.TaskProcessEndEvent>;
|
||||
readonly onDidStartTaskProblemMatchers: Event<vscode.TaskProblemMatcherStartedEvent>;
|
||||
readonly onDidEndTaskProblemMatchers: Event<vscode.TaskProblemMatcherEndedEvent>;
|
||||
|
||||
registerTaskProvider(extension: IExtensionDescription, type: string, provider: vscode.TaskProvider): vscode.Disposable;
|
||||
registerTaskSystem(scheme: string, info: tasks.ITaskSystemInfoDTO): void;
|
||||
|
||||
@@ -26,7 +26,7 @@ const emptyCommandService: ICommandService = {
|
||||
|
||||
const emptyNotificationService = new class implements INotificationService {
|
||||
declare readonly _serviceBrand: undefined;
|
||||
onDidChangeFilter: Event<void> = Event.None;
|
||||
readonly onDidChangeFilter: Event<void> = Event.None;
|
||||
notify(...args: unknown[]): never {
|
||||
throw new Error('not implemented');
|
||||
}
|
||||
@@ -65,7 +65,7 @@ class EmptyNotificationService implements INotificationService {
|
||||
constructor(private withNotify: (notification: INotification) => void) {
|
||||
}
|
||||
|
||||
onDidChangeFilter: Event<void> = Event.None;
|
||||
readonly onDidChangeFilter: Event<void> = Event.None;
|
||||
notify(notification: INotification): INotificationHandle {
|
||||
this.withNotify(notification);
|
||||
|
||||
|
||||
@@ -521,7 +521,7 @@ export interface ITunnel {
|
||||
/**
|
||||
* Implementers of Tunnel should fire onDidDispose when dispose is called.
|
||||
*/
|
||||
onDidDispose: Event<void>;
|
||||
readonly onDidDispose: Event<void>;
|
||||
|
||||
dispose(): Promise<void> | void;
|
||||
}
|
||||
|
||||
@@ -845,7 +845,7 @@ export class NoTreeViewError extends Error {
|
||||
|
||||
export interface ITreeViewDataProvider {
|
||||
readonly isTreeEmpty?: boolean;
|
||||
onDidChangeEmpty?: Event<void>;
|
||||
readonly onDidChangeEmpty?: Event<void>;
|
||||
getChildren(element?: ITreeItem): Promise<ITreeItem[] | undefined>;
|
||||
getChildrenBatch?(element?: ITreeItem[]): Promise<ITreeItem[][] | undefined>;
|
||||
}
|
||||
@@ -865,9 +865,9 @@ export interface IEditableData {
|
||||
}
|
||||
|
||||
export interface IViewPaneContainer {
|
||||
onDidAddViews: Event<IView[]>;
|
||||
onDidRemoveViews: Event<IView[]>;
|
||||
onDidChangeViewVisibility: Event<IView>;
|
||||
readonly onDidAddViews: Event<IView[]>;
|
||||
readonly onDidRemoveViews: Event<IView[]>;
|
||||
readonly onDidChangeViewVisibility: Event<IView>;
|
||||
|
||||
readonly views: IView[];
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ export interface IChatConfirmationButton<T> {
|
||||
tooltip?: string;
|
||||
data: T;
|
||||
disabled?: boolean;
|
||||
onDidChangeDisablement?: Event<boolean>;
|
||||
readonly onDidChangeDisablement?: Event<boolean>;
|
||||
moreActions?: (IChatConfirmationButton<T> | Separator)[];
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ export interface IChatViewsWelcomeDescriptor {
|
||||
}
|
||||
|
||||
export interface IChatViewsWelcomeContributionRegistry {
|
||||
onDidChange: Event<void>;
|
||||
readonly onDidChange: Event<void>;
|
||||
get(): ReadonlyArray<IChatViewsWelcomeDescriptor>;
|
||||
register(descriptor: IChatViewsWelcomeDescriptor): void;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ export interface IChatModeService {
|
||||
readonly _serviceBrand: undefined;
|
||||
|
||||
// TODO expose an observable list of modes
|
||||
onDidChangeChatModes: Event<void>;
|
||||
readonly onDidChangeChatModes: Event<void>;
|
||||
getModes(): { builtin: readonly IChatMode[]; custom: readonly IChatMode[] };
|
||||
findModeById(id: string): IChatMode | undefined;
|
||||
findModeByName(name: string): IChatMode | undefined;
|
||||
|
||||
@@ -176,7 +176,7 @@ export interface IChatProgressMessage {
|
||||
export interface IChatTask extends IChatTaskDto {
|
||||
deferred: DeferredPromise<string | void>;
|
||||
progress: (IChatWarningMessage | IChatContentReference)[];
|
||||
onDidAddProgress: Event<IChatWarningMessage | IChatContentReference>;
|
||||
readonly onDidAddProgress: Event<IChatWarningMessage | IChatContentReference>;
|
||||
add(progress: IChatWarningMessage | IChatContentReference): void;
|
||||
|
||||
complete: (result: string | void) => void;
|
||||
@@ -725,7 +725,7 @@ export interface IChatService {
|
||||
_serviceBrand: undefined;
|
||||
transferredSessionData: IChatTransferredSessionData | undefined;
|
||||
|
||||
onDidSubmitRequest: Event<{ chatSessionId: string }>;
|
||||
readonly onDidSubmitRequest: Event<{ chatSessionId: string }>;
|
||||
|
||||
isEnabled(location: ChatAgentLocation): boolean;
|
||||
hasSessions(): boolean;
|
||||
@@ -757,9 +757,9 @@ export interface IChatService {
|
||||
getChatStorageFolder(): URI;
|
||||
logChatIndex(): void;
|
||||
|
||||
onDidPerformUserAction: Event<IChatUserActionEvent>;
|
||||
readonly onDidPerformUserAction: Event<IChatUserActionEvent>;
|
||||
notifyUserAction(event: IChatUserActionEvent): void;
|
||||
onDidDisposeSession: Event<{ sessionId: string; reason: 'cleared' }>;
|
||||
readonly onDidDisposeSession: Event<{ sessionId: string; reason: 'cleared' }>;
|
||||
|
||||
transferChatSession(transferredSessionData: IChatTransferredSessionData, toWorkspace: URI): void;
|
||||
|
||||
|
||||
@@ -316,7 +316,7 @@ export type CountTokensCallback = (input: string, token: CancellationToken) => P
|
||||
|
||||
export interface ILanguageModelToolsService {
|
||||
_serviceBrand: undefined;
|
||||
onDidChangeTools: Event<void>;
|
||||
readonly onDidChangeTools: Event<void>;
|
||||
registerToolData(toolData: IToolData): IDisposable;
|
||||
registerToolImplementation(id: string, tool: IToolImpl): IDisposable;
|
||||
registerTool(toolData: IToolData, tool: IToolImpl): IDisposable;
|
||||
|
||||
@@ -206,7 +206,7 @@ export interface ILanguageModelChatResponse {
|
||||
}
|
||||
|
||||
export interface ILanguageModelChatProvider {
|
||||
onDidChange: Event<void>;
|
||||
readonly onDidChange: Event<void>;
|
||||
provideLanguageModelChatInfo(options: { silent: boolean }, token: CancellationToken): Promise<ILanguageModelChatMetadataAndIdentifier[]>;
|
||||
sendChatRequest(modelId: string, messages: IChatMessage[], from: ExtensionIdentifier, options: { [name: string]: any }, token: CancellationToken): Promise<ILanguageModelChatResponse>;
|
||||
provideTokenCount(modelId: string, message: string | IChatMessage, token: CancellationToken): Promise<number>;
|
||||
@@ -240,7 +240,7 @@ export interface ILanguageModelsService {
|
||||
readonly _serviceBrand: undefined;
|
||||
|
||||
// TODO @lramos15 - Make this a richer event in the future. Right now it just indicates some change happened, but not what
|
||||
onDidChangeLanguageModels: Event<void>;
|
||||
readonly onDidChangeLanguageModels: Event<void>;
|
||||
|
||||
updateModelPickerPreference(modelIdentifier: string, showInModelPicker: boolean): void;
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ export class MockChatService implements IChatService {
|
||||
_serviceBrand: undefined;
|
||||
editingSessions = [];
|
||||
transferredSessionData: IChatTransferredSessionData | undefined;
|
||||
onDidSubmitRequest: Event<{ chatSessionId: string }> = Event.None;
|
||||
readonly onDidSubmitRequest: Event<{ chatSessionId: string }> = Event.None;
|
||||
|
||||
private sessions = new Map<string, IChatModel>();
|
||||
|
||||
@@ -90,11 +90,11 @@ export class MockChatService implements IChatService {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
|
||||
onDidPerformUserAction: Event<IChatUserActionEvent> = undefined!;
|
||||
readonly onDidPerformUserAction: Event<IChatUserActionEvent> = undefined!;
|
||||
notifyUserAction(event: IChatUserActionEvent): void {
|
||||
throw new Error('Method not implemented.');
|
||||
}
|
||||
onDidDisposeSession: Event<{ sessionId: string; reason: 'cleared' }> = undefined!;
|
||||
readonly onDidDisposeSession: Event<{ sessionId: string; reason: 'cleared' }> = undefined!;
|
||||
|
||||
transferChatSession(transferredSessionData: IChatTransferredSessionData, toWorkspace: URI): void {
|
||||
throw new Error('Method not implemented.');
|
||||
|
||||
@@ -20,7 +20,7 @@ export class MockLanguageModelToolsService implements ILanguageModelToolsService
|
||||
cancelToolCallsForRequest(requestId: string): void {
|
||||
}
|
||||
|
||||
onDidChangeTools: Event<void> = Event.None;
|
||||
readonly onDidChangeTools: Event<void> = Event.None;
|
||||
|
||||
registerToolData(toolData: IToolData): IDisposable {
|
||||
return Disposable.None;
|
||||
|
||||
@@ -34,15 +34,15 @@ class TestCommentThread implements CommentThread<IRange> {
|
||||
public readonly range: IRange,
|
||||
public readonly comments: Comment[]) { }
|
||||
|
||||
onDidChangeComments: Event<readonly Comment[] | undefined> = new Emitter<readonly Comment[] | undefined>().event;
|
||||
onDidChangeInitialCollapsibleState: Event<CommentThreadCollapsibleState | undefined> = new Emitter<CommentThreadCollapsibleState | undefined>().event;
|
||||
readonly onDidChangeComments: Event<readonly Comment[] | undefined> = new Emitter<readonly Comment[] | undefined>().event;
|
||||
readonly onDidChangeInitialCollapsibleState: Event<CommentThreadCollapsibleState | undefined> = new Emitter<CommentThreadCollapsibleState | undefined>().event;
|
||||
canReply: boolean = false;
|
||||
onDidChangeInput: Event<CommentInput | undefined> = new Emitter<CommentInput | undefined>().event;
|
||||
onDidChangeRange: Event<IRange> = new Emitter<IRange>().event;
|
||||
onDidChangeLabel: Event<string | undefined> = new Emitter<string | undefined>().event;
|
||||
onDidChangeCollapsibleState: Event<CommentThreadCollapsibleState | undefined> = new Emitter<CommentThreadCollapsibleState | undefined>().event;
|
||||
onDidChangeState: Event<CommentThreadState | undefined> = new Emitter<CommentThreadState | undefined>().event;
|
||||
onDidChangeCanReply: Event<boolean> = new Emitter<boolean>().event;
|
||||
readonly onDidChangeInput: Event<CommentInput | undefined> = new Emitter<CommentInput | undefined>().event;
|
||||
readonly onDidChangeRange: Event<IRange> = new Emitter<IRange>().event;
|
||||
readonly onDidChangeLabel: Event<string | undefined> = new Emitter<string | undefined>().event;
|
||||
readonly onDidChangeCollapsibleState: Event<CommentThreadCollapsibleState | undefined> = new Emitter<CommentThreadCollapsibleState | undefined>().event;
|
||||
readonly onDidChangeState: Event<CommentThreadState | undefined> = new Emitter<CommentThreadState | undefined>().event;
|
||||
readonly onDidChangeCanReply: Event<boolean> = new Emitter<boolean>().event;
|
||||
isDisposed: boolean = false;
|
||||
isTemplate: boolean = false;
|
||||
label: string | undefined = undefined;
|
||||
|
||||
@@ -38,7 +38,7 @@ import { ILifecycleService, LifecyclePhase } from '../../../services/lifecycle/c
|
||||
const jsonRegistry = Registry.as<IJSONContributionRegistry>(JSONExtensions.JSONContribution);
|
||||
|
||||
export interface IAdapterManagerDelegate {
|
||||
onDidNewSession: Event<IDebugSession>;
|
||||
readonly onDidNewSession: Event<IDebugSession>;
|
||||
configurationManager(): IConfigurationManager;
|
||||
}
|
||||
|
||||
|
||||
@@ -720,17 +720,17 @@ export interface IViewModel extends ITreeElement {
|
||||
|
||||
isMultiSessionView(): boolean;
|
||||
|
||||
onDidFocusSession: Event<IDebugSession | undefined>;
|
||||
onDidFocusThread: Event<{ thread: IThread | undefined; explicit: boolean; session: IDebugSession | undefined }>;
|
||||
onDidFocusStackFrame: Event<{ stackFrame: IStackFrame | undefined; explicit: boolean; session: IDebugSession | undefined }>;
|
||||
onDidSelectExpression: Event<{ expression: IExpression; settingWatch: boolean } | undefined>;
|
||||
onDidEvaluateLazyExpression: Event<IExpressionContainer>;
|
||||
readonly onDidFocusSession: Event<IDebugSession | undefined>;
|
||||
readonly onDidFocusThread: Event<{ thread: IThread | undefined; explicit: boolean; session: IDebugSession | undefined }>;
|
||||
readonly onDidFocusStackFrame: Event<{ stackFrame: IStackFrame | undefined; explicit: boolean; session: IDebugSession | undefined }>;
|
||||
readonly onDidSelectExpression: Event<{ expression: IExpression; settingWatch: boolean } | undefined>;
|
||||
readonly onDidEvaluateLazyExpression: Event<IExpressionContainer>;
|
||||
/**
|
||||
* Fired when `setVisualizedExpression`, to migrate elements currently
|
||||
* rendered as `original` to the `replacement`.
|
||||
*/
|
||||
onDidChangeVisualization: Event<{ original: IExpression; replacement: IExpression }>;
|
||||
onWillUpdateViews: Event<void>;
|
||||
readonly onDidChangeVisualization: Event<{ original: IExpression; replacement: IExpression }>;
|
||||
readonly onWillUpdateViews: Event<void>;
|
||||
|
||||
evaluateLazyExpression(expression: IExpressionContainer): void;
|
||||
}
|
||||
@@ -762,16 +762,16 @@ export interface IDebugModel extends ITreeElement {
|
||||
getWatchExpressions(): ReadonlyArray<IExpression & IEvaluate>;
|
||||
registerBreakpointModes(debugType: string, modes: DebugProtocol.BreakpointMode[]): void;
|
||||
getBreakpointModes(forBreakpointType: 'source' | 'exception' | 'data' | 'instruction'): DebugProtocol.BreakpointMode[];
|
||||
onDidChangeBreakpoints: Event<IBreakpointsChangeEvent | undefined>;
|
||||
onDidChangeCallStack: Event<void>;
|
||||
readonly onDidChangeBreakpoints: Event<IBreakpointsChangeEvent | undefined>;
|
||||
readonly onDidChangeCallStack: Event<void>;
|
||||
/**
|
||||
* The expression has been added, removed, or repositioned.
|
||||
*/
|
||||
onDidChangeWatchExpressions: Event<IExpression | undefined>;
|
||||
readonly onDidChangeWatchExpressions: Event<IExpression | undefined>;
|
||||
/**
|
||||
* The expression's value has changed.
|
||||
*/
|
||||
onDidChangeWatchExpressionValue: Event<IExpression | undefined>;
|
||||
readonly onDidChangeWatchExpressionValue: Event<IExpression | undefined>;
|
||||
|
||||
fetchCallstack(thread: IThread, levels?: number): Promise<void>;
|
||||
}
|
||||
@@ -1022,12 +1022,12 @@ export interface IConfigurationManager {
|
||||
/**
|
||||
* Allows to register on change of selected debug configuration.
|
||||
*/
|
||||
onDidSelectConfiguration: Event<void>;
|
||||
readonly onDidSelectConfiguration: Event<void>;
|
||||
|
||||
/**
|
||||
* Allows to register on change of selected debug configuration.
|
||||
*/
|
||||
onDidChangeConfigurationProviders: Event<void>;
|
||||
readonly onDidChangeConfigurationProviders: Event<void>;
|
||||
|
||||
hasDebugConfigurationProvider(debugType: string, triggerKind?: DebugConfigurationProviderTriggerKind): boolean;
|
||||
getDynamicProviders(): Promise<{ label: string; type: string; pick: () => Promise<{ launch: ILaunch; config: IConfig; label: string } | undefined> }[]>;
|
||||
@@ -1045,7 +1045,7 @@ export enum DebuggerString {
|
||||
|
||||
export interface IAdapterManager {
|
||||
|
||||
onDidRegisterDebugger: Event<void>;
|
||||
readonly onDidRegisterDebugger: Event<void>;
|
||||
|
||||
hasEnabledDebuggers(): boolean;
|
||||
getDebugAdapterDescriptor(session: IDebugSession): Promise<IAdapterDescriptor | undefined>;
|
||||
@@ -1139,19 +1139,19 @@ export interface IDebugService {
|
||||
/**
|
||||
* Allows to register on debug state changes.
|
||||
*/
|
||||
onDidChangeState: Event<State>;
|
||||
readonly onDidChangeState: Event<State>;
|
||||
|
||||
/**
|
||||
* Allows to register on sessions about to be created (not yet fully initialised).
|
||||
* This is fired exactly one time for any given session.
|
||||
*/
|
||||
onWillNewSession: Event<IDebugSession>;
|
||||
readonly onWillNewSession: Event<IDebugSession>;
|
||||
|
||||
/**
|
||||
* Fired when a new debug session is started. This may fire multiple times
|
||||
* for a single session due to restarts.
|
||||
*/
|
||||
onDidNewSession: Event<IDebugSession>;
|
||||
readonly onDidNewSession: Event<IDebugSession>;
|
||||
|
||||
/**
|
||||
* Allows to register on end session events.
|
||||
@@ -1159,7 +1159,7 @@ export interface IDebugService {
|
||||
* Contains a boolean indicating whether the session will restart. If restart
|
||||
* is true, the session should not considered to be dead yet.
|
||||
*/
|
||||
onDidEndSession: Event<{ session: IDebugSession; restart: boolean }>;
|
||||
readonly onDidEndSession: Event<{ session: IDebugSession; restart: boolean }>;
|
||||
|
||||
/**
|
||||
* Gets the configuration manager.
|
||||
|
||||
@@ -85,7 +85,7 @@ class ExtensionsViewState extends Disposable implements IExtensionsViewState {
|
||||
export interface ExtensionsListViewOptions {
|
||||
server?: IExtensionManagementServer;
|
||||
flexibleHeight?: boolean;
|
||||
onDidChangeTitle?: Event<string>;
|
||||
readonly onDidChangeTitle?: Event<string>;
|
||||
hideBadge?: boolean;
|
||||
}
|
||||
|
||||
|
||||
@@ -203,8 +203,8 @@ export interface IExtensionContainer extends IDisposable {
|
||||
}
|
||||
|
||||
export interface IExtensionsViewState {
|
||||
onFocus: Event<IExtension>;
|
||||
onBlur: Event<IExtension>;
|
||||
readonly onFocus: Event<IExtension>;
|
||||
readonly onBlur: Event<IExtension>;
|
||||
filters: {
|
||||
featureId?: string;
|
||||
};
|
||||
|
||||
@@ -42,10 +42,10 @@ export interface IInlineChatSession2 {
|
||||
export interface IInlineChatSessionService {
|
||||
_serviceBrand: undefined;
|
||||
|
||||
onWillStartSession: Event<IActiveCodeEditor>;
|
||||
onDidMoveSession: Event<IInlineChatSessionEvent>;
|
||||
onDidStashSession: Event<IInlineChatSessionEvent>;
|
||||
onDidEndSession: Event<IInlineChatSessionEndEvent>;
|
||||
readonly onWillStartSession: Event<IActiveCodeEditor>;
|
||||
readonly onDidMoveSession: Event<IInlineChatSessionEvent>;
|
||||
readonly onDidStashSession: Event<IInlineChatSessionEvent>;
|
||||
readonly onDidEndSession: Event<IInlineChatSessionEndEvent>;
|
||||
|
||||
createSession(editor: IActiveCodeEditor, options: { wholeRange?: IRange; session?: Session; headless?: boolean }, token: CancellationToken): Promise<Session | undefined>;
|
||||
|
||||
@@ -68,5 +68,5 @@ export interface IInlineChatSessionService {
|
||||
|
||||
createSession2(editor: ICodeEditor, uri: URI, token: CancellationToken): Promise<IInlineChatSession2>;
|
||||
getSession2(uri: URI): IInlineChatSession2 | undefined;
|
||||
onDidChangeSessions: Event<this>;
|
||||
readonly onDidChangeSessions: Event<this>;
|
||||
}
|
||||
|
||||
@@ -12,8 +12,8 @@ export const IInteractiveDocumentService = createDecorator<IInteractiveDocumentS
|
||||
|
||||
export interface IInteractiveDocumentService {
|
||||
readonly _serviceBrand: undefined;
|
||||
onWillAddInteractiveDocument: Event<{ notebookUri: URI; inputUri: URI; languageId: string }>;
|
||||
onWillRemoveInteractiveDocument: Event<{ notebookUri: URI; inputUri: URI }>;
|
||||
readonly onWillAddInteractiveDocument: Event<{ notebookUri: URI; inputUri: URI; languageId: string }>;
|
||||
readonly onWillRemoveInteractiveDocument: Event<{ notebookUri: URI; inputUri: URI }>;
|
||||
willCreateInteractiveDocument(notebookUri: URI, inputUri: URI, languageId: string): void;
|
||||
willRemoveInteractiveDocument(notebookUri: URI, inputUri: URI): void;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ interface IQueryResult {
|
||||
model: IPagedModel<IWorkbenchMcpServer>;
|
||||
disposables: DisposableStore;
|
||||
showWelcomeContent?: boolean;
|
||||
onDidChangeModel?: Event<IPagedModel<IWorkbenchMcpServer>>;
|
||||
readonly onDidChangeModel?: Event<IPagedModel<IWorkbenchMcpServer>>;
|
||||
}
|
||||
|
||||
type Message = {
|
||||
|
||||
@@ -34,9 +34,9 @@ export interface INotebookTextDiffEditor {
|
||||
readonly textModel?: NotebookTextModel;
|
||||
inlineNotebookEditor: INotebookEditor | undefined;
|
||||
readonly currentChangedIndex: IObservable<number>;
|
||||
onMouseUp: Event<{ readonly event: MouseEvent; readonly target: IDiffElementViewModelBase }>;
|
||||
onDidScroll: Event<void>;
|
||||
onDidDynamicOutputRendered: Event<{ cell: IGenericCellViewModel; output: ICellOutputViewModel }>;
|
||||
readonly onMouseUp: Event<{ readonly event: MouseEvent; readonly target: IDiffElementViewModelBase }>;
|
||||
readonly onDidScroll: Event<void>;
|
||||
readonly onDidDynamicOutputRendered: Event<{ cell: IGenericCellViewModel; output: ICellOutputViewModel }>;
|
||||
getOverflowContainerDomNode(): HTMLElement;
|
||||
getLayoutInfo(): NotebookLayoutInfo;
|
||||
getScrollTop(): number;
|
||||
@@ -112,7 +112,7 @@ export interface NotebookDocumentDiffElementRenderTemplate extends CellDiffCommo
|
||||
}
|
||||
|
||||
export interface IDiffCellMarginOverlay extends IDisposable {
|
||||
onAction: Event<void>;
|
||||
readonly onAction: Event<void>;
|
||||
show(): void;
|
||||
hide(): void;
|
||||
}
|
||||
@@ -185,7 +185,7 @@ export interface INotebookDiffViewModel extends IDisposable {
|
||||
/**
|
||||
* Triggered when ever there's a change in the view model items.
|
||||
*/
|
||||
onDidChangeItems: Event<INotebookDiffViewModelUpdateEvent>;
|
||||
readonly onDidChangeItems: Event<INotebookDiffViewModelUpdateEvent>;
|
||||
/**
|
||||
* Computes the differences and generates the viewmodel.
|
||||
* If view models are generated, then the onDidChangeItems is triggered.
|
||||
|
||||
@@ -14,7 +14,7 @@ export type UnchangedEditorRegionOptions = {
|
||||
minimumLineCount: number;
|
||||
revealLineCount: number;
|
||||
};
|
||||
onDidChangeEnablement: Event<boolean>;
|
||||
readonly onDidChangeEnablement: Event<boolean>;
|
||||
};
|
||||
|
||||
export function getUnchangedRegionSettings(configurationService: IConfigurationService): (Readonly<UnchangedEditorRegionOptions> & IDisposable) {
|
||||
|
||||
@@ -493,9 +493,9 @@ export interface INotebookViewModel {
|
||||
readonly viewCells: ICellViewModel[];
|
||||
layoutInfo: NotebookLayoutInfo | null;
|
||||
viewType: string;
|
||||
onDidChangeViewCells: Event<INotebookViewCellsUpdateEvent>;
|
||||
onDidChangeSelection: Event<string>;
|
||||
onDidFoldingStateChanged: Event<void>;
|
||||
readonly onDidChangeViewCells: Event<INotebookViewCellsUpdateEvent>;
|
||||
readonly onDidChangeSelection: Event<string>;
|
||||
readonly onDidFoldingStateChanged: Event<void>;
|
||||
getNearestVisibleCellIndexUpwards(index: number): number;
|
||||
getTrackedRange(id: string): ICellRange | null;
|
||||
setTrackedRange(id: string | null, newRange: ICellRange | null, newStickiness: TrackedRangeStickiness): string | null;
|
||||
|
||||
@@ -24,8 +24,8 @@ export interface INotebookEditorService {
|
||||
|
||||
retrieveExistingWidgetFromURI(resource: URI): IBorrowValue<NotebookEditorWidget> | undefined;
|
||||
retrieveAllExistingWidgets(): IBorrowValue<NotebookEditorWidget>[];
|
||||
onDidAddNotebookEditor: Event<INotebookEditor>;
|
||||
onDidRemoveNotebookEditor: Event<INotebookEditor>;
|
||||
readonly onDidAddNotebookEditor: Event<INotebookEditor>;
|
||||
readonly onDidRemoveNotebookEditor: Event<INotebookEditor>;
|
||||
addNotebookEditor(editor: INotebookEditor): void;
|
||||
removeNotebookEditor(editor: INotebookEditor): void;
|
||||
getNotebookEditor(editorId: string): INotebookEditor | undefined;
|
||||
|
||||
@@ -570,7 +570,7 @@ export class NotebookService extends Disposable implements INotebookService {
|
||||
readonly onWillRemoveViewType;
|
||||
|
||||
private readonly _onDidChangeEditorTypes;
|
||||
onDidChangeEditorTypes: Event<void>;
|
||||
readonly onDidChangeEditorTypes: Event<void>;
|
||||
|
||||
private _cutItems: NotebookCellTextModel[] | undefined;
|
||||
private _lastClipboardIsCopy: boolean;
|
||||
|
||||
@@ -114,7 +114,7 @@ export class NotebookCellList extends WorkbenchList<CellViewModel> implements ID
|
||||
|
||||
private readonly _onDidChangeVisibleRanges = this._localDisposableStore.add(new Emitter<void>());
|
||||
|
||||
onDidChangeVisibleRanges: Event<void> = this._onDidChangeVisibleRanges.event;
|
||||
readonly onDidChangeVisibleRanges: Event<void> = this._onDidChangeVisibleRanges.event;
|
||||
private _visibleRanges: ICellRange[] = [];
|
||||
|
||||
get visibleRanges() {
|
||||
|
||||
@@ -32,11 +32,11 @@ export interface INotebookCellList extends ICoordinatesConverter {
|
||||
element(index: number): ICellViewModel | undefined;
|
||||
elementAt(position: number): ICellViewModel | undefined;
|
||||
elementHeight(element: ICellViewModel): number;
|
||||
onWillScroll: Event<ScrollEvent>;
|
||||
onDidScroll: Event<ScrollEvent>;
|
||||
onDidChangeFocus: Event<IListEvent<ICellViewModel>>;
|
||||
onDidChangeContentHeight: Event<number>;
|
||||
onDidChangeVisibleRanges: Event<void>;
|
||||
readonly onWillScroll: Event<ScrollEvent>;
|
||||
readonly onDidScroll: Event<ScrollEvent>;
|
||||
readonly onDidChangeFocus: Event<IListEvent<ICellViewModel>>;
|
||||
readonly onDidChangeContentHeight: Event<number>;
|
||||
readonly onDidChangeVisibleRanges: Event<void>;
|
||||
visibleRanges: ICellRange[];
|
||||
scrollTop: number;
|
||||
scrollHeight: number;
|
||||
|
||||
@@ -53,7 +53,7 @@ type Listener<T> = { fn: (evt: T) => void; thisArg: unknown };
|
||||
|
||||
interface EmitterLike<T> {
|
||||
fire(data: T): void;
|
||||
event: Event<T>;
|
||||
readonly event: Event<T>;
|
||||
}
|
||||
|
||||
interface PreloadStyles {
|
||||
|
||||
@@ -117,7 +117,7 @@ export abstract class BaseCellViewModel extends Disposable {
|
||||
private readonly _textModelRefChangeDisposable = this._register(new MutableDisposable());
|
||||
|
||||
private readonly _cellDecorationsChanged = this._register(new Emitter<{ added: INotebookCellDecorationOptions[]; removed: INotebookCellDecorationOptions[] }>());
|
||||
onCellDecorationsChanged: Event<{ added: INotebookCellDecorationOptions[]; removed: INotebookCellDecorationOptions[] }> = this._cellDecorationsChanged.event;
|
||||
readonly onCellDecorationsChanged: Event<{ added: INotebookCellDecorationOptions[]; removed: INotebookCellDecorationOptions[] }> = this._cellDecorationsChanged.event;
|
||||
|
||||
private _resolvedDecorations = new Map<string, {
|
||||
id?: string;
|
||||
|
||||
@@ -178,7 +178,7 @@ export class NotebookViewModel extends Disposable implements EditorFoldingStateD
|
||||
public readonly id: string;
|
||||
private _foldingRanges: FoldingRegions | null = null;
|
||||
private _onDidFoldingStateChanged = new Emitter<void>();
|
||||
onDidFoldingStateChanged: Event<void> = this._onDidFoldingStateChanged.event;
|
||||
readonly onDidFoldingStateChanged: Event<void> = this._onDidFoldingStateChanged.event;
|
||||
private _hiddenRanges: ICellRange[] = [];
|
||||
private _focused: boolean = true;
|
||||
|
||||
|
||||
@@ -243,7 +243,7 @@ export class NotebookEditorWorkbenchToolbar extends Disposable {
|
||||
}
|
||||
}
|
||||
private readonly _onDidChangeVisibility = this._register(new Emitter<boolean>());
|
||||
onDidChangeVisibility: Event<boolean> = this._onDidChangeVisibility.event;
|
||||
readonly onDidChangeVisibility: Event<boolean> = this._onDidChangeVisibility.event;
|
||||
|
||||
get useGlobalToolbar(): boolean {
|
||||
return this._useGlobalToolbar;
|
||||
|
||||
@@ -235,7 +235,7 @@ export interface ICellOutput {
|
||||
* Alternative output id that's reused when the output is updated.
|
||||
*/
|
||||
alternativeOutputId: string;
|
||||
onDidChangeData: Event<void>;
|
||||
readonly onDidChangeData: Event<void>;
|
||||
replaceData(items: IOutputDto): void;
|
||||
appendData(items: IOutputItemDto[]): void;
|
||||
appendedSinceVersion(versionId: number, mime: string): VSBuffer | undefined;
|
||||
@@ -277,13 +277,13 @@ export interface ICell {
|
||||
getHashValue(): number;
|
||||
textBuffer: IReadonlyTextBuffer;
|
||||
textModel?: ITextModel;
|
||||
onDidChangeTextModel: Event<void>;
|
||||
readonly onDidChangeTextModel: Event<void>;
|
||||
getValue(): string;
|
||||
onDidChangeOutputs?: Event<NotebookCellOutputsSplice>;
|
||||
onDidChangeOutputItems?: Event<void>;
|
||||
onDidChangeLanguage: Event<string>;
|
||||
onDidChangeMetadata: Event<void>;
|
||||
onDidChangeInternalMetadata: Event<CellInternalMetadataChangedEvent>;
|
||||
readonly onDidChangeOutputs?: Event<NotebookCellOutputsSplice>;
|
||||
readonly onDidChangeOutputItems?: Event<void>;
|
||||
readonly onDidChangeLanguage: Event<string>;
|
||||
readonly onDidChangeMetadata: Event<void>;
|
||||
readonly onDidChangeInternalMetadata: Event<CellInternalMetadataChangedEvent>;
|
||||
}
|
||||
|
||||
export interface INotebookSnapshotOptions {
|
||||
@@ -305,8 +305,8 @@ export interface INotebookTextModel extends INotebookTextModelLike {
|
||||
createSnapshot(options: INotebookSnapshotOptions): NotebookData;
|
||||
restoreSnapshot(snapshot: NotebookData, transientOptions?: TransientOptions): void;
|
||||
applyEdits(rawEdits: ICellEditOperation[], synchronous: boolean, beginSelectionState: ISelectionState | undefined, endSelectionsComputer: () => ISelectionState | undefined, undoRedoGroup: UndoRedoGroup | undefined, computeUndoRedo?: boolean): boolean;
|
||||
onDidChangeContent: Event<NotebookTextModelChangedEvent>;
|
||||
onWillDispose: Event<void>;
|
||||
readonly onDidChangeContent: Event<NotebookTextModelChangedEvent>;
|
||||
readonly onWillDispose: Event<void>;
|
||||
}
|
||||
|
||||
export type NotebookCellTextModelSplice<T> = [
|
||||
|
||||
@@ -83,8 +83,8 @@ export const INotebookExecutionStateService = createDecorator<INotebookExecution
|
||||
export interface INotebookExecutionStateService {
|
||||
_serviceBrand: undefined;
|
||||
|
||||
onDidChangeExecution: Event<ICellExecutionStateChangedEvent | IExecutionStateChangedEvent>;
|
||||
onDidChangeLastRunFailState: Event<INotebookFailStateChangedEvent>;
|
||||
readonly onDidChangeExecution: Event<ICellExecutionStateChangedEvent | IExecutionStateChangedEvent>;
|
||||
readonly onDidChangeLastRunFailState: Event<INotebookFailStateChangedEvent>;
|
||||
|
||||
forceCancelNotebookExecutions(notebookUri: URI): void;
|
||||
getCellExecutionsForNotebook(notebook: URI): INotebookCellExecution[];
|
||||
|
||||
@@ -15,7 +15,7 @@ export interface INotebookRendererMessagingService {
|
||||
/**
|
||||
* Event that fires when a message should be posted to extension hosts.
|
||||
*/
|
||||
onShouldPostMessage: Event<{ editorId: string; rendererId: string; message: unknown }>;
|
||||
readonly onShouldPostMessage: Event<{ editorId: string; rendererId: string; message: unknown }>;
|
||||
|
||||
/**
|
||||
* Prepares messaging for the given renderer ID.
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ suite('notebookCellDiagnostics', () => {
|
||||
|
||||
interface ITestMarkerService extends IMarkerService {
|
||||
markers: ResourceMap<IMarkerData[]>;
|
||||
onMarkersUpdated: Event<void>;
|
||||
readonly onMarkersUpdated: Event<void>;
|
||||
}
|
||||
|
||||
setup(function () {
|
||||
|
||||
@@ -149,7 +149,7 @@ export class DefineKeybindingWidget extends Widget {
|
||||
private _onHide = this._register(new Emitter<void>());
|
||||
|
||||
private _onDidChange = this._register(new Emitter<string>());
|
||||
onDidChange: Event<string> = this._onDidChange.event;
|
||||
readonly onDidChange: Event<string> = this._onDidChange.event;
|
||||
|
||||
private _onShowExistingKeybindings = this._register(new Emitter<string | null>());
|
||||
readonly onShowExistingKeybidings: Event<string | null> = this._onShowExistingKeybindings.event;
|
||||
|
||||
@@ -57,7 +57,7 @@ import { mainWindow } from '../../../../base/browser/window.js';
|
||||
import { IHoverService } from '../../../../platform/hover/browser/hover.js';
|
||||
|
||||
interface IViewModel {
|
||||
onDidChangeHelpInformation: Event<void>;
|
||||
readonly onDidChangeHelpInformation: Event<void>;
|
||||
helpInformation: HelpInformation[];
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import { createDecorator } from '../../../../platform/instantiation/common/insta
|
||||
|
||||
export interface ISearchHistoryService {
|
||||
readonly _serviceBrand: undefined;
|
||||
onDidClearHistory: Event<void>;
|
||||
readonly onDidClearHistory: Event<void>;
|
||||
clearHistory(): void;
|
||||
load(): ISearchHistoryValues;
|
||||
save(history: ISearchHistoryValues): void;
|
||||
|
||||
@@ -103,7 +103,7 @@ export interface ITaskDefinitionRegistry {
|
||||
get(key: string): Tasks.ITaskDefinition;
|
||||
all(): Tasks.ITaskDefinition[];
|
||||
getJsonSchema(): IJSONSchema;
|
||||
onDefinitionsChanged: Event<void>;
|
||||
readonly onDefinitionsChanged: Event<void>;
|
||||
}
|
||||
|
||||
class TaskDefinitionRegistryImpl implements ITaskDefinitionRegistry {
|
||||
|
||||
@@ -63,11 +63,11 @@ export interface IWorkspaceFolderTaskResult extends IWorkspaceTaskResult {
|
||||
|
||||
export interface ITaskService {
|
||||
readonly _serviceBrand: undefined;
|
||||
onDidStateChange: Event<ITaskEvent>;
|
||||
readonly onDidStateChange: Event<ITaskEvent>;
|
||||
/** Fired when task providers are registered or unregistered */
|
||||
onDidChangeTaskProviders: Event<void>;
|
||||
readonly onDidChangeTaskProviders: Event<void>;
|
||||
isReconnected: boolean;
|
||||
onDidReconnectToTasks: Event<void>;
|
||||
readonly onDidReconnectToTasks: Event<void>;
|
||||
supportsMultipleTaskExecutions: boolean;
|
||||
|
||||
configureAction(): Action;
|
||||
@@ -103,8 +103,8 @@ export interface ITaskService {
|
||||
registerTaskProvider(taskProvider: ITaskProvider, type: string): IDisposable;
|
||||
|
||||
registerTaskSystem(scheme: string, taskSystemInfo: ITaskSystemInfo): void;
|
||||
onDidChangeTaskSystemInfo: Event<void>;
|
||||
onDidChangeTaskConfig: Event<void>;
|
||||
readonly onDidChangeTaskSystemInfo: Event<void>;
|
||||
readonly onDidChangeTaskConfig: Event<void>;
|
||||
readonly hasTaskSystemInfo: boolean;
|
||||
registerSupportedExecutions(custom?: boolean, shell?: boolean, process?: boolean): void;
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@ export interface ITaskSystemInfoResolver {
|
||||
}
|
||||
|
||||
export interface ITaskSystem {
|
||||
onDidStateChange: Event<ITaskEvent>;
|
||||
readonly onDidStateChange: Event<ITaskEvent>;
|
||||
reconnect(task: Task, resolver: ITaskResolver): ITaskExecuteResult;
|
||||
run(task: Task, resolver: ITaskResolver): ITaskExecuteResult;
|
||||
rerun(): ITaskExecuteResult | undefined;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user