Skip to content

Commit 2836424

Browse files
authored
Merge pull request #41 from xMuratY/main
fix: handle tuple array type in MapType definition
2 parents cae13a8 + f3fada0 commit 2836424

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/advanced/abi-mapper.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export type MapTuple<T> =
5454
// prettier-ignore
5555
export type MapType<T extends BaseComponent> =
5656
T extends Tuple<Array<Component<string>>> ? MapTuple<T['components']> :
57+
T extends { readonly type: 'tuple[]'; readonly components: infer C extends Array<Component<string>> } ? MapTuple<C>[] :
5758
T extends Component<infer Type> ? GetType<Type> :
5859
unknown; // default
5960
export type UnmapType<T> = T extends MapType<infer U> ? U : never;

0 commit comments

Comments
 (0)