Fixes typescript issues (#27565)
This commit is contained in:
@@ -6,7 +6,7 @@ import { DataQuery } from './datasource';
|
||||
*/
|
||||
export interface DataLinkClickEvent<T = any> {
|
||||
origin: T;
|
||||
scopedVars: ScopedVars;
|
||||
scopedVars?: ScopedVars;
|
||||
e?: any; // mouse|react event
|
||||
}
|
||||
|
||||
|
||||
@@ -283,7 +283,7 @@ export class LinkSrv implements LinkService {
|
||||
/**
|
||||
* Returns LinkModel which is basically a DataLink with all values interpolated through the templateSrv.
|
||||
*/
|
||||
getDataLinkUIModel = <T>(link: DataLink, scopedVars: ScopedVars, origin: T): LinkModel<T> => {
|
||||
getDataLinkUIModel = <T>(link: DataLink, scopedVars: ScopedVars | undefined, origin: T): LinkModel<T> => {
|
||||
const params: KeyValue = {};
|
||||
const timeRangeUrl = urlUtil.toUrlParams(this.timeSrv.timeRangeForUrl());
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@ export class TablePanelEditorCtrl {
|
||||
fontSizes: any;
|
||||
addColumnSegment: any;
|
||||
getColumnNames: any;
|
||||
canSetColumns: boolean;
|
||||
columnsHelpMessage: string;
|
||||
canSetColumns = false;
|
||||
columnsHelpMessage = '';
|
||||
|
||||
/** @ngInject */
|
||||
constructor($scope: any, private uiSegmentSrv: any) {
|
||||
|
||||
@@ -477,7 +477,7 @@ describe('when rendering table with different patterns', () => {
|
||||
});
|
||||
|
||||
describe('when rendering cells with different alignment options', () => {
|
||||
const cases = [
|
||||
const cases: Array<[string, boolean, string | null, string]> = [
|
||||
//align, preserve fmt, color mode, expected
|
||||
['', false, null, '<td>42</td>'],
|
||||
['invalid_option', false, null, '<td>42</td>'],
|
||||
|
||||
@@ -25,7 +25,6 @@ export class DatasourceSrvMock {
|
||||
|
||||
export class MockDataSourceApi extends DataSourceApi {
|
||||
result: DataQueryResponse = { data: [] };
|
||||
queryResolver: Promise<DataQueryResponse>;
|
||||
|
||||
constructor(name?: string, result?: DataQueryResponse, meta?: any, private error: string | null = null) {
|
||||
super({ name: name ? name : 'MockDataSourceApi' } as DataSourceInstanceSettings);
|
||||
@@ -37,10 +36,6 @@ export class MockDataSourceApi extends DataSourceApi {
|
||||
}
|
||||
|
||||
query(request: DataQueryRequest): Promise<DataQueryResponse> {
|
||||
if (this.queryResolver) {
|
||||
return this.queryResolver;
|
||||
}
|
||||
|
||||
if (this.error) {
|
||||
return Promise.reject(this.error);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user