mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 (#6381)
* Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 * disable strict null check
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
import 'vs/css!./actionbar';
|
||||
import * as platform from 'vs/base/common/platform';
|
||||
import * as nls from 'vs/nls';
|
||||
import { Disposable, dispose } from 'vs/base/common/lifecycle';
|
||||
import { Disposable, dispose, IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { SelectBox, ISelectOptionItem, ISelectBoxOptions } from 'vs/base/browser/ui/selectBox/selectBox';
|
||||
import { IAction, IActionRunner, Action, IActionChangeEvent, ActionRunner, IRunEvent } from 'vs/base/common/actions';
|
||||
import * as DOM from 'vs/base/browser/dom';
|
||||
@@ -16,16 +16,14 @@ import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
|
||||
import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
|
||||
import { IContextViewProvider } from 'vs/base/browser/ui/contextview/contextview';
|
||||
import { Event, Emitter } from 'vs/base/common/event';
|
||||
import { asArray } from 'vs/base/common/arrays';
|
||||
|
||||
export interface IActionViewItem {
|
||||
export interface IActionViewItem extends IDisposable {
|
||||
actionRunner: IActionRunner;
|
||||
setActionContext(context: any): void;
|
||||
render(element: HTMLElement): void;
|
||||
isEnabled(): boolean;
|
||||
focus(fromRight?: boolean): void;
|
||||
blur(): void;
|
||||
dispose(): void;
|
||||
}
|
||||
|
||||
export interface IBaseActionViewItemOptions {
|
||||
@@ -407,16 +405,16 @@ export class ActionBar extends Disposable implements IActionRunner {
|
||||
protected actionsList: HTMLElement;
|
||||
|
||||
private _onDidBlur = this._register(new Emitter<void>());
|
||||
get onDidBlur(): Event<void> { return this._onDidBlur.event; }
|
||||
readonly onDidBlur: Event<void> = this._onDidBlur.event;
|
||||
|
||||
private _onDidCancel = this._register(new Emitter<void>());
|
||||
get onDidCancel(): Event<void> { return this._onDidCancel.event; }
|
||||
readonly onDidCancel: Event<void> = this._onDidCancel.event;
|
||||
|
||||
private _onDidRun = this._register(new Emitter<IRunEvent>());
|
||||
get onDidRun(): Event<IRunEvent> { return this._onDidRun.event; }
|
||||
readonly onDidRun: Event<IRunEvent> = this._onDidRun.event;
|
||||
|
||||
private _onDidBeforeRun = this._register(new Emitter<IRunEvent>());
|
||||
get onDidBeforeRun(): Event<IRunEvent> { return this._onDidBeforeRun.event; }
|
||||
readonly onDidBeforeRun: Event<IRunEvent> = this._onDidBeforeRun.event;
|
||||
|
||||
constructor(container: HTMLElement, options: IActionBarOptions = defaultOptions) {
|
||||
super();
|
||||
@@ -593,8 +591,8 @@ export class ActionBar extends Disposable implements IActionRunner {
|
||||
return this.domNode;
|
||||
}
|
||||
|
||||
push(arg: IAction | IAction[], options: IActionOptions = {}): void {
|
||||
const actions: IAction[] = asArray(arg);
|
||||
push(arg: IAction | ReadonlyArray<IAction>, options: IActionOptions = {}): void {
|
||||
const actions: ReadonlyArray<IAction> = Array.isArray(arg) ? arg : [arg];
|
||||
|
||||
let index = types.isNumber(options.index) ? options.index : null;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user