-
For some reasons it would be greate to export those types. Today I'm was trying to create wrapper outside the original persist function and I've get troubles with the types. By the way, I cant understand why this types (on images) not available to export. |
Beta Was this translation helpful? Give feedback.
Answered by
dai-shi
Nov 29, 2023
Replies: 1 comment
-
It's intentional. WithFoo type is for module argumentation, and not something that we specify from outside. If you want to create your own middleware/wrapper that has precise typing, you need to follow the TypeScript guide, and the guide could be improved. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
chiralium
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's intentional. WithFoo type is for module argumentation, and not something that we specify from outside.
If you want to create your own middleware/wrapper that has precise typing, you need to follow the TypeScript guide, and the guide could be improved.
On the other hand, if we want to bypass some typings, it's probably possible with assertion -> #2222.