Skip to content

Commit

Permalink
tabify.js -> tabify.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
alexwizp committed Feb 18, 2020
1 parent 9bee65e commit 39471a2
Show file tree
Hide file tree
Showing 6 changed files with 198 additions and 187 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,9 @@ export const writeParams = <
aggs?: IAggConfigs,
locals?: Record<string, any>
) => {
const output = { params: {} as Record<string, any> };
const output: Record<string, any> = {
params: {} as Record<string, any>,
};
locals = locals || {};

params.forEach(param => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import { TabifyBuckets } from './buckets';

describe('Buckets wrapper', () => {
function check(aggResp: any, count: number, keys: string[]) {
const check = (aggResp: any, count: number, keys: string[]) => {
test('reads the length', () => {
const buckets = new TabifyBuckets(aggResp);
expect(buckets).toHaveLength(count);
Expand All @@ -39,7 +39,7 @@ describe('Buckets wrapper', () => {
expect(keysSent).toHaveLength(count);
expect(keysSent).toEqual(keys);
});
}
};

describe('with object style buckets', () => {
let aggResp: any = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class TabbedAggResponseWriter {

constructor(
aggs: IAggConfigs,
{ metricsAtAllLevels = false, partialRows = false }: TabbedResponseWriterOptions
{ metricsAtAllLevels = false, partialRows = false }: Partial<TabbedResponseWriterOptions>
) {
this.partialRows = partialRows;

Expand Down
31 changes: 0 additions & 31 deletions src/legacy/core_plugins/data/public/search/tabify/tabify.d.ts

This file was deleted.

152 changes: 0 additions & 152 deletions src/legacy/core_plugins/data/public/search/tabify/tabify.js

This file was deleted.

Loading

0 comments on commit 39471a2

Please sign in to comment.