How to properly type a publicClient as parameter in function? #3059
Unanswered
leanazulyoro
asked this question in
Question
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm struggling when attempting to pass a
publicClient
to a function and have all types work correctly.I did get some improvement with the approach suggested here: #2282, but now I'm getting
Property 'read' does not exist on type ...
FYI, the function is working, and if I have the code outside the function I do not get any error messages, so the problem must be on how I'm typing the
client
parameter.Here's a playground with the issue:
https://www.typescriptlang.org/play/?#code/JYWwDg9gTgLgBAbzgQQCaqgUwM7YDRwDGWAhjJgAoCuARgDbCEDCDmAdjAQBYwxgFMuJYGwLV6jFsHac4AFSgk22SLAIBzTDCYQOiwrMxRCAJgAMyGsDgBfOADMoEEHABEAN2khXAbgBQoKrwSCDCbGxatg5OLh5eAPSEQiLYvn7p6ZgAHkEOVGwGwLpwpKgAIpiEoCR02AA8SWFw2eRsqNhwgmEAfAAUfnBErBwAXHDiDMzDMHUKSirQso0i3XgDzcbmaBg42GPbWLh+AJSI64S62PAXeiQGcAC8cJraujD6ML0I64MkVmNGUwWKxrQa-dCHPYbIEHXagsGEabrGzHdKDLAwKhQNhEN4fAB0pXxqEq1VqvVRNgyNyucDAtEmUhkjyIpHIE0k0y+52SbDGoREEU463e8yCYx4fApaxR-nSpQqVVC5PpEim0g4BAA5GYsiQzDQABwANgAnKaAIyEY0mC2GmgAZmNhAtqAtptQABYSCZMKbMDQzIRME6zMaA57DVrjkA
Beta Was this translation helpful? Give feedback.
All reactions