refactor: Upgrade to TypeScript 5.5 (no-changelog) (#9828)

This commit is contained in:
Iván Ovejero
2024-06-24 17:49:59 +02:00
committed by GitHub
parent 1ba656ef4a
commit e33a47311f
16 changed files with 321 additions and 322 deletions

View File

@@ -186,8 +186,8 @@ for (const evaluator of ['tmpl', 'tournament'] as const) {
}
test(t.expression, () => {
const evaluationTests = t.tests.filter(
(test) => test.type === 'evaluation',
) as ExpressionTestEvaluation[];
(test): test is ExpressionTestEvaluation => test.type === 'evaluation',
);
for (const test of evaluationTests) {
const input = test.input.map((d) => ({ json: d })) as any;
@@ -209,8 +209,8 @@ for (const evaluator of ['tmpl', 'tournament'] as const) {
}
test(t.expression, () => {
for (const test of t.tests.filter(
(test) => test.type === 'transform',
) as ExpressionTestTransform[]) {
(test): test is ExpressionTestTransform => test.type === 'transform',
)) {
const expr = t.expression;
expect(extendSyntax(expr, test.forceTransform)).toEqual(test.result ?? expr);
}