Skip to content

Commit

Permalink
Add array (#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
Arrowana committed Sep 9, 2021
1 parent 00e9ff6 commit 48786dc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/anchor-contrib/src/index.ts
Expand Up @@ -124,6 +124,8 @@ type DecodeType<T extends IdlType, Defined> = T extends keyof TypeMap
? Defined[T["vec"]["defined"]][]
: T extends { vec: keyof TypeMap }
? TypeMap[T["vec"]][]
: T extends { array: [idlType: keyof TypeMap, size: number] }
? TypeMap[T["array"][0]][]
: unknown;

type MakeArgs<A extends IdlField[], Defined> = {
Expand Down

1 comment on commit 48786dc

@vercel
Copy link

@vercel vercel bot commented on 48786dc Sep 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.