From 1aef553d0991fca9940ed0521dab246de08a0a77 Mon Sep 17 00:00:00 2001 From: Tom French <15848336+TomAFrench@users.noreply.github.com> Date: Fri, 1 Nov 2024 13:50:47 +0000 Subject: [PATCH] fix: remove extra `number` from return type of `acirGetCircuitSizes` (#9493) Due to the use of `any` we're returning a `Promise<[number, number]>` in a function which has the return type of `Promise<[number, number, number]>` --- barretenberg/ts/src/barretenberg_api/index.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/barretenberg/ts/src/barretenberg_api/index.ts b/barretenberg/ts/src/barretenberg_api/index.ts index d25b0adbc31..dca7e7cabdd 100644 --- a/barretenberg/ts/src/barretenberg_api/index.ts +++ b/barretenberg/ts/src/barretenberg_api/index.ts @@ -328,10 +328,7 @@ export class BarretenbergApi { return; } - async acirGetCircuitSizes( - constraintSystemBuf: Uint8Array, - honkRecursion: boolean, - ): Promise<[number, number, number]> { + async acirGetCircuitSizes(constraintSystemBuf: Uint8Array, honkRecursion: boolean): Promise<[number, number]> { const inArgs = [constraintSystemBuf, honkRecursion].map(serializeBufferable); const outTypes: OutputType[] = [NumberDeserializer(), NumberDeserializer()]; const result = await this.wasm.callWasmExport( @@ -340,7 +337,7 @@ export class BarretenbergApi { outTypes.map(t => t.SIZE_IN_BYTES), ); const out = result.map((r, i) => outTypes[i].fromBuffer(r)); - return out as any; + return out as [number, number]; } async acirNewAcirComposer(sizeHint: number): Promise {