Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update gts to latest #1221

Merged
merged 4 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion benchmarks/helpers/graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ function median(values: number[]) {
return (values[values.length / 2 - 1] + values[values.length / 2]) / 2;
}

interface PreparedResult extends Partial<Record<BenchmarkLabel, number>> {
name: string;
}

// Cheap aggregation of benchmark data.
// For the repeated bar chart, vega-lite expects a numeric value for each
// repeated field (the benchmark label) for each benchmarked library (`name`).
Expand All @@ -66,7 +70,7 @@ function prepareData(values: BenchmarkResult[], resultCountToInclude = 4) {
bin.push(result);
});

const preparedResult: any[] = [];
const preparedResult: PreparedResult[] = [];

function updateResult(
name: string,
Expand Down
6 changes: 3 additions & 3 deletions benchmarks/helpers/register.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const registeredBenchmarks = new Map<AvailableBenchmarksIds, BenchmarkCase[]>();
*/
export function getRegisteredBenchmarks(): [
keyof AvailableBenchmarks,
BenchmarkCase[]
BenchmarkCase[],
][] {
return [...registeredBenchmarks.entries()];
}
Expand All @@ -34,7 +34,7 @@ export function getRegisteredBenchmarks(): [
*/
export function addCase<
K extends keyof AvailableBenchmarks,
I = AvailableBenchmarks[K]['prototype']['fn']
I = AvailableBenchmarks[K]['prototype']['fn'],
>(
moduleName: string,
benchmarkId: K,
Expand Down Expand Up @@ -75,7 +75,7 @@ export function addCase<

export function createCase<
K extends keyof AvailableBenchmarks,
I = AvailableBenchmarks[K]['prototype']['fn']
I = AvailableBenchmarks[K]['prototype']['fn'],
>(
moduleName: string,
benchmarkId: K,
Expand Down
4 changes: 2 additions & 2 deletions cases/deepkit/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ export function assertLoose(input: unknown): boolean {
*
* Raise errors if any extra keys not present in the schema are found.
*/
export function assertStrict(input: unknown): boolean {
export function assertStrict(): boolean {
throw new Error('not supported.');
}

/**
* Like parseSafe but throw on unknown (extra) keys in objects.
*/
export function parseStrict(input: unknown): ToBeChecked {
export function parseStrict(): ToBeChecked {
throw new Error('not supported.');
}

Expand Down
2 changes: 1 addition & 1 deletion cases/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const cases = [
'deepkit',
] as const;

export type CaseName = typeof cases[number];
export type CaseName = (typeof cases)[number];

export async function importCase(caseName: CaseName) {
await import('./' + caseName);
Expand Down
Loading
Loading