mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Add no implicit any to the strict null check (#5635)
* wip * working through adding no implicit any
This commit is contained in:
28
src/typings/globals/slickgrid/index.d.ts
vendored
28
src/typings/globals/slickgrid/index.d.ts
vendored
@@ -96,8 +96,8 @@ declare namespace Slick {
|
||||
export class EventHandler {
|
||||
constructor();
|
||||
|
||||
public subscribe<T>(event: Event<T>, handler: Function): EventHandler;
|
||||
public unsubscribe<T>(event: Event<T>, handler: Function): EventHandler;
|
||||
public subscribe<T>(event: Event<T>, handler: (event: DOMEvent, args: T) => void): EventHandler;
|
||||
public unsubscribe<T>(event: Event<T>, handler: (event: DOMEvent, args: T) => void): EventHandler;
|
||||
public unsubscribeAll(): EventHandler;
|
||||
}
|
||||
|
||||
@@ -668,6 +668,11 @@ declare namespace Slick {
|
||||
* Page grid when navigating
|
||||
*/
|
||||
emulatePagingWhenScrolling?: boolean;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
minRowBuffer?: number;
|
||||
}
|
||||
|
||||
export interface DataProvider<T extends SlickData> {
|
||||
@@ -687,10 +692,14 @@ declare namespace Slick {
|
||||
* @param index
|
||||
*/
|
||||
getItemMetadata?(index: number): RowMetadata<T>;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
getItems(): Array<T>;
|
||||
}
|
||||
|
||||
export interface SlickData {
|
||||
// todo ? might be able to leave as empty
|
||||
export interface SlickData extends Object {
|
||||
}
|
||||
|
||||
export interface RowMetadata<T> {
|
||||
@@ -772,7 +781,7 @@ declare namespace Slick {
|
||||
/**
|
||||
* Sets selected ranges for the grid
|
||||
*/
|
||||
setSelectedRanges(ranges: Slick.Range[]);
|
||||
setSelectedRanges(ranges: Slick.Range[]): void;
|
||||
|
||||
/**
|
||||
* Gets selected ranges for the grid
|
||||
@@ -818,10 +827,7 @@ declare namespace Slick {
|
||||
* Returns an array of every data object, unless you're using DataView in which case it returns a DataView object.
|
||||
* @return
|
||||
**/
|
||||
public getData(): any;
|
||||
//public getData(): T[];
|
||||
// Issue: typescript limitation, cannot differentiate calls by return type only, so need to cast to DataView or T[].
|
||||
//public getData(): DataView;
|
||||
public getData(): T[] | DataProvider<T>;
|
||||
|
||||
/**
|
||||
* Returns the databinding item at a given position.
|
||||
@@ -1228,7 +1234,7 @@ declare namespace Slick {
|
||||
public render(): void;
|
||||
public invalidate(): void;
|
||||
public invalidateRow(row: number): void;
|
||||
public invalidateRows(rows: number[], keepEditor: boolean): void;
|
||||
public invalidateRows(rows: number[], keepEditor?: boolean): void;
|
||||
public invalidateAllRows(): void;
|
||||
public updateCell(row: number, cell: number): void;
|
||||
public updateRow(row: number): void;
|
||||
@@ -1543,7 +1549,7 @@ declare namespace Slick {
|
||||
}
|
||||
|
||||
export interface Formatter<T extends SlickData> {
|
||||
(row: number, cell: number, value: any, columnDef: Column<T>, dataContext: SlickData): string;
|
||||
(row: number, cell: number, value: any, columnDef: Column<T>, dataContext: SlickData): string | undefined;
|
||||
}
|
||||
|
||||
export module Formatters {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Generated by typings
|
||||
// Source: node_modules/angular2-slickgrid/out/js/interfaces.d.ts
|
||||
// Source: ../node_modules/angular2-slickgrid/out/js/interfaces.d.ts
|
||||
declare module '~angular2-slickgrid/out/js/interfaces' {
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
export enum NotificationType {
|
||||
@@ -21,6 +21,7 @@ export interface IObservableCollection<T> {
|
||||
at(index: number): T;
|
||||
getRange(start: number, end: number): T[];
|
||||
setCollectionChangedCallback(callback: (change: CollectionChange, startIndex: number, count: number) => void): void;
|
||||
resetWindowsAroundIndex(index: number): void;
|
||||
}
|
||||
export class CancellationToken {
|
||||
private _isCanceled;
|
||||
@@ -33,10 +34,6 @@ export interface IGridColumnDefinition {
|
||||
id: string;
|
||||
type: number;
|
||||
}
|
||||
export interface IGridDataRow {
|
||||
row?: number;
|
||||
values: any[];
|
||||
}
|
||||
export interface ISlickColumn<T> extends Slick.Column<T> {
|
||||
isEditable?: boolean;
|
||||
}
|
||||
@@ -46,7 +43,7 @@ export * from '~angular2-slickgrid/out/js/interfaces';
|
||||
}
|
||||
|
||||
// Generated by typings
|
||||
// Source: node_modules/angular2-slickgrid/out/js/selectionModel.d.ts
|
||||
// Source: ../node_modules/angular2-slickgrid/out/js/selectionModel.d.ts
|
||||
declare module '~angular2-slickgrid/out/js/selectionModel' {
|
||||
import { ISelectionRange } from '~angular2-slickgrid/out/js/interfaces';
|
||||
export class SelectionModel implements ISlickSelectionModel {
|
||||
@@ -106,20 +103,16 @@ export * from '~angular2-slickgrid/out/js/selectionModel';
|
||||
}
|
||||
|
||||
// Generated by typings
|
||||
// Source: node_modules/angular2-slickgrid/out/js/slickGrid.d.ts
|
||||
// Source: ../node_modules/angular2-slickgrid/out/js/slickGrid.d.ts
|
||||
declare module '~angular2-slickgrid/out/js/slickGrid' {
|
||||
import { OnChanges, OnInit, OnDestroy, SimpleChange, EventEmitter, AfterViewInit } from '@angular/core';
|
||||
import { Observable } from 'rxjs/Rx';
|
||||
import { IObservableCollection, IGridDataRow, ISlickColumn } from '~angular2-slickgrid/out/js/interfaces';
|
||||
export class OnRangeRenderCompletedEventArgs {
|
||||
startRow: number;
|
||||
endRow: number;
|
||||
}
|
||||
import { IObservableCollection, ISlickColumn } from '~angular2-slickgrid/out/js/interfaces';
|
||||
export function getOverridableTextEditorClass(grid: SlickGrid): any;
|
||||
export class SlickGrid implements OnChanges, OnInit, OnDestroy, AfterViewInit {
|
||||
private _el;
|
||||
columnDefinitions: ISlickColumn<any>[];
|
||||
dataRows: IObservableCollection<IGridDataRow>;
|
||||
dataRows: IObservableCollection<{}>;
|
||||
resized: Observable<any>;
|
||||
highlightedCells: {
|
||||
row: number;
|
||||
@@ -135,23 +128,18 @@ export class SlickGrid implements OnChanges, OnInit, OnDestroy, AfterViewInit {
|
||||
plugins: Array<string | Slick.Plugin<any>>;
|
||||
enableEditing: boolean;
|
||||
topRowNumber: number;
|
||||
overrideCellFn: (rowNumber, columnId, value?, data?) => string;
|
||||
overrideCellFn: (rowNumber: number, columnId: number, value?: any, data?: any) => string;
|
||||
isCellEditValid: (row: number, column: number, newValue: any) => boolean;
|
||||
onBeforeAppendCell: (row: number, column: number) => string;
|
||||
loadFinished: EventEmitter<void>;
|
||||
onContextMenu: EventEmitter<Slick.OnContextMenuEventArgs<any>>;
|
||||
onContextMenu: EventEmitter<Slick.EventData>;
|
||||
onScroll: EventEmitter<Slick.OnScrollEventArgs<any>>;
|
||||
onActiveCellChanged: EventEmitter<Slick.OnActiveCellChangedEventArgs<any>>;
|
||||
onBeforeEditCell: EventEmitter<Slick.OnBeforeEditCellEventArgs<any>>;
|
||||
onCellChange: EventEmitter<Slick.OnCellChangeEventArgs<any>>;
|
||||
onRendered: EventEmitter<Slick.OnRenderedEventArgs<any>>;
|
||||
onFocus(): void;
|
||||
rowHeight: number;
|
||||
private _rowHeight;
|
||||
private _grid;
|
||||
private _gridColumns;
|
||||
private _columnNameToIndex;
|
||||
private _gridData;
|
||||
private _resizeSubscription;
|
||||
private _gridSyncSubscription;
|
||||
constructor(_el: any);
|
||||
ngOnChanges(changes: {
|
||||
[propName: string]: SimpleChange;
|
||||
@@ -168,17 +156,7 @@ export class SlickGrid implements OnChanges, OnInit, OnDestroy, AfterViewInit {
|
||||
registerPlugin(plugin: Slick.Plugin<any> | string): void;
|
||||
setActive(): void;
|
||||
selection: Slick.Range[] | boolean;
|
||||
private initGrid();
|
||||
private changeEditSession(enabled);
|
||||
private onResize();
|
||||
private invalidateRange(start, end);
|
||||
private getColumnEditor(column);
|
||||
private getFormatter;
|
||||
private setupEvents();
|
||||
private updateSchema();
|
||||
private setCallbackOnDataRowsChanged();
|
||||
readonly activeCell: Slick.Cell;
|
||||
private renderGridDataRowsRange(startIndex, count);
|
||||
}
|
||||
}
|
||||
declare module 'angular2-slickgrid/out/js/slickGrid' {
|
||||
@@ -186,25 +164,16 @@ export * from '~angular2-slickgrid/out/js/slickGrid';
|
||||
}
|
||||
|
||||
// Generated by typings
|
||||
// Source: node_modules/angular2-slickgrid/out/js/virtualizedCollection.d.ts
|
||||
// Source: ../node_modules/angular2-slickgrid/out/js/virtualizedCollection.d.ts
|
||||
declare module '~angular2-slickgrid/out/js/virtualizedCollection' {
|
||||
import { IObservableCollection, CollectionChange } from '~angular2-slickgrid/out/js/interfaces';
|
||||
export class VirtualizedCollection<TData> implements IObservableCollection<TData> {
|
||||
private _placeHolderGenerator;
|
||||
private _length;
|
||||
private _windowSize;
|
||||
private _bufferWindowBefore;
|
||||
private _window;
|
||||
private _bufferWindowAfter;
|
||||
private collectionChangedCallback;
|
||||
constructor(windowSize: number, length: number, loadFn: (offset: number, count: number) => Promise<TData[]>, _placeHolderGenerator: (index: number) => TData);
|
||||
setCollectionChangedCallback(callback: (change: CollectionChange, startIndex: number, count: number) => void): void;
|
||||
getLength(): number;
|
||||
at(index: number): TData;
|
||||
getRange(start: number, end: number): TData[];
|
||||
private getRangeFromCurrent(start, end);
|
||||
private getDataFromCurrent(index);
|
||||
resetWindowsAroundIndex(index);
|
||||
resetWindowsAroundIndex(index: number): void;
|
||||
}
|
||||
}
|
||||
declare module 'angular2-slickgrid/out/js/virtualizedCollection' {
|
||||
@@ -212,7 +181,7 @@ export * from '~angular2-slickgrid/out/js/virtualizedCollection';
|
||||
}
|
||||
|
||||
// Generated by typings
|
||||
// Source: node_modules/angular2-slickgrid/out/index.d.ts
|
||||
// Source: ../node_modules/angular2-slickgrid/out/index.d.ts
|
||||
declare module '~angular2-slickgrid/out/index' {
|
||||
export * from '~angular2-slickgrid/out/js/interfaces';
|
||||
export * from '~angular2-slickgrid/out/js/selectionModel';
|
||||
|
||||
Reference in New Issue
Block a user