We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 57bb158 commit 59125a8Copy full SHA for 59125a8
.changeset/fuzzy-nails-wait.md
@@ -0,0 +1,5 @@
1
+---
2
+'@codama/nodes-from-anchor': patch
3
4
+
5
+recognize unit structs types from anchor
packages/nodes-from-anchor/src/v01/typeNodes/TypeNode.ts
@@ -92,7 +92,7 @@ export const typeNodeFromAnchorV01 = (idlType: IdlV01Type | IdlV01TypeDefTy): Ty
92
}
93
94
// Struct and Tuple.
95
- if ('kind' in idlType && idlType.kind === 'struct' && 'fields' in idlType) {
+ if ('kind' in idlType && idlType.kind === 'struct') {
96
const fields = idlType.fields ?? [];
97
if (isStructFieldArray(fields)) {
98
return structTypeNodeFromAnchorV01(idlType);
0 commit comments