Skip to content

Commit

Permalink
chore: fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench committed Nov 24, 2023
1 parent 0efea9b commit fe2d712
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions tooling/noir_codegen/src/noir_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,8 @@ function generateStructInterfaces(
if (!output.has(structName)) {
codeGeneratedStruct += `export type ${structName} = {\n`;
for (const field of type.fields) {
const [name, type] = field;
codeGeneratedStruct += ` ${name}: ${abiTypeToTs(type, primitiveTypeMap)};\n`;
typesEncountered.add(type);
codeGeneratedStruct += ` ${field.name}: ${abiTypeToTs(field.type, primitiveTypeMap)};\n`;
typesEncountered.add(field.type);
}
codeGeneratedStruct += `};`;
output.add(structName);
Expand Down
2 changes: 1 addition & 1 deletion tooling/noirc_abi_wasm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export type AbiType =
{ kind: "integer", sign: Sign, width: number } |
{ kind: "array", length: number, type: AbiType } |
{ kind: "tuple", fields: AbiType[] } |
{ kind: "struct", path: string, fields: [string, AbiType][] };
{ kind: "struct", path: string, fields: { name: string, type: AbiType }[] };
export type AbiParameter = {
name: string,
Expand Down

0 comments on commit fe2d712

Please sign in to comment.