Skip to content

Commit

Permalink
fix return type altough thats not really needed anyway
Browse files Browse the repository at this point in the history
  • Loading branch information
Trivo25 committed Aug 24, 2024
1 parent 7962d1e commit fc360fa
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/lib/proof-system/zkprogram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -691,17 +691,17 @@ function ZkProgram<
key: K,
i: number
): [K, Prover<AuxiliaryOutput, PublicInput, PublicOutput, Types[K]>] {
async function prove_(
publicInput: PublicInput,
...args: TupleToInstances<Types[typeof key]>
): Promise<
AuxiliaryOutput extends void
async function prove_<
Return = AuxiliaryOutput extends void
? Proof<PublicInput, PublicOutput>
: {
proof: Proof<PublicInput, PublicOutput>;
auxiliaryOutput: AuxiliaryOutput;
}
> {
>(
publicInput: PublicInput,
...args: TupleToInstances<Types[typeof key]>
): Promise<Return> {
let picklesProver = compileOutput?.provers?.[i];
if (picklesProver === undefined) {
throw Error(
Expand Down Expand Up @@ -745,9 +745,9 @@ function ZkProgram<
auxiliaryOutputFields
),
proof: programProof,
} as any;
} as Return;
} else {
return programProof as any;
return programProof as Return;
}
}
let prove: Prover<AuxiliaryOutput, PublicInput, PublicOutput, Types[K]>;
Expand Down

0 comments on commit fc360fa

Please sign in to comment.