mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-09 00:05:28 +01:00
Merge pull request #70269 from mjbvz/strict-extHostStatusBar
Strict null check extHostStatusBar
This commit is contained in:
@@ -114,6 +114,7 @@
|
||||
"./vs/workbench/api/node/extHostQuickOpen.ts",
|
||||
"./vs/workbench/api/node/extHostSCM.ts",
|
||||
"./vs/workbench/api/node/extHostSearch.ts",
|
||||
"./vs/workbench/api/node/extHostStatusBar.ts",
|
||||
"./vs/workbench/api/node/extHostStorage.ts",
|
||||
"./vs/workbench/api/node/extHostTextEditor.ts",
|
||||
"./vs/workbench/api/node/extHostTextEditors.ts",
|
||||
|
||||
Vendored
+1
-1
@@ -4517,7 +4517,7 @@ declare module 'vscode' {
|
||||
* The priority of this item. Higher value means the item should
|
||||
* be shown more to the left.
|
||||
*/
|
||||
readonly priority: number;
|
||||
readonly priority?: number;
|
||||
|
||||
/**
|
||||
* The text to show for the entry. You can embed icons in the text by leveraging the syntax:
|
||||
|
||||
@@ -466,7 +466,7 @@ export interface MainThreadQuickOpenShape extends IDisposable {
|
||||
}
|
||||
|
||||
export interface MainThreadStatusBarShape extends IDisposable {
|
||||
$setEntry(id: number, extensionId: ExtensionIdentifier, text: string, tooltip: string, command: string, color: string | ThemeColor, alignment: MainThreadStatusBarAlignment, priority: number): void;
|
||||
$setEntry(id: number, extensionId: ExtensionIdentifier | undefined, text: string, tooltip: string, command: string, color: string | ThemeColor, alignment: MainThreadStatusBarAlignment, priority: number | undefined): void;
|
||||
$dispose(id: number): void;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ export class ExtHostStatusBarEntry implements StatusBarItem {
|
||||
|
||||
private _id: number;
|
||||
private _alignment: number;
|
||||
private _priority: number;
|
||||
private _priority?: number;
|
||||
private _disposed: boolean;
|
||||
private _visible: boolean;
|
||||
|
||||
@@ -26,9 +26,9 @@ export class ExtHostStatusBarEntry implements StatusBarItem {
|
||||
private _timeoutHandle: any;
|
||||
private _proxy: MainThreadStatusBarShape;
|
||||
|
||||
private _extensionId: ExtensionIdentifier;
|
||||
private _extensionId?: ExtensionIdentifier;
|
||||
|
||||
constructor(proxy: MainThreadStatusBarShape, extensionId: ExtensionIdentifier, alignment: ExtHostStatusBarAlignment = ExtHostStatusBarAlignment.Left, priority?: number) {
|
||||
constructor(proxy: MainThreadStatusBarShape, extensionId: ExtensionIdentifier | undefined, alignment: ExtHostStatusBarAlignment = ExtHostStatusBarAlignment.Left, priority?: number) {
|
||||
this._id = ExtHostStatusBarEntry.ID_GEN++;
|
||||
this._proxy = proxy;
|
||||
this._alignment = alignment;
|
||||
@@ -44,7 +44,7 @@ export class ExtHostStatusBarEntry implements StatusBarItem {
|
||||
return this._alignment;
|
||||
}
|
||||
|
||||
public get priority(): number {
|
||||
public get priority(): number | undefined {
|
||||
return this._priority;
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@ export class ExtHostStatusBar {
|
||||
this._statusMessage = new StatusBarMessage(this);
|
||||
}
|
||||
|
||||
createStatusBarEntry(extensionId: ExtensionIdentifier, alignment?: ExtHostStatusBarAlignment, priority?: number): StatusBarItem {
|
||||
createStatusBarEntry(extensionId: ExtensionIdentifier | undefined, alignment?: ExtHostStatusBarAlignment, priority?: number): StatusBarItem {
|
||||
return new ExtHostStatusBarEntry(this._proxy, extensionId, alignment, priority);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user