Skip to content

Commit

Permalink
chore: make clearer that timingData can contain TimingCategory or any…
Browse files Browse the repository at this point in the history
… other string
  • Loading branch information
kmruiz committed Nov 30, 2023
1 parent 1233d5a commit f544ee3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions packages/cli-repl/src/startup-timing.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { TimingCategories, type TimingInterface } from '@mongosh/types';
import {
TimingCategories,
type TimingCategory,
type TimingInterface,
} from '@mongosh/types';

const jsTimingEntries: [string, string, bigint][] = [];

Expand Down Expand Up @@ -29,7 +33,9 @@ function linkTimingInterface(): TimingInterface {
};
}

export function summariseTimingData(timingData: [string, string, number][]): {
export function summariseTimingData(
timingData: [string | TimingCategory, string, number][]
): {
[key: string]: number;
} {
const durationByCategory = new Map<string, number>();
Expand Down

0 comments on commit f544ee3

Please sign in to comment.