From 08a8b1cc7179cdb02360b6406ffa2ae8b2882723 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 17 Jan 2026 20:02:55 +0000 Subject: [PATCH] Fix TypeScript compilation errors in RCFNum tests - Fix type declaration: use ReturnType to get RCFNum type from Context - Add explicit type annotation to forEach parameter - Add RCFNum to imports Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com> --- src/api/js/src/high-level/high-level.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api/js/src/high-level/high-level.test.ts b/src/api/js/src/high-level/high-level.test.ts index 413fcce30..4ba5d1d6f 100644 --- a/src/api/js/src/high-level/high-level.test.ts +++ b/src/api/js/src/high-level/high-level.test.ts @@ -1,7 +1,7 @@ import assert from 'assert'; import asyncToArray from 'iter-tools/methods/async-to-array'; import { init, killThreads } from '../jest'; -import { Arith, Bool, Model, Quantifier, Z3AssertionError, Z3HighLevel, AstVector } from './types'; +import { Arith, Bool, Model, Quantifier, Z3AssertionError, Z3HighLevel, AstVector, RCFNum } from './types'; import { expectType } from 'ts-expect'; // this should not be necessary but there may be a Jest bug @@ -1986,7 +1986,7 @@ describe('high-level', () => { }); describe('RCFNum', () => { - let RCFNum: Z3HighLevel['RCFNum']; + let RCFNum: ReturnType>['RCFNum']; beforeEach(() => { ({ RCFNum } = api.Context('rcf')); @@ -2145,7 +2145,7 @@ describe('high-level', () => { expect(roots.length).toBe(2); // All roots should be algebraic - roots.forEach(root => { + roots.forEach((root: RCFNum<'rcf'>) => { expect(root.isAlgebraic()).toBe(true); });