Question about return type for Typescript #3483
crystalfp
started this conversation in
Design decisions
Replies: 1 comment
-
|
The TypeScript definitions are hand-written. Some of them are a bit generic and can be refined. I think we simply need to improve the type definition of function |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I just started using the library in my Nodejs+Typescript project with great satisfaction.
But I don't understand the return typing of some functions.
For an example of what I need,
invroutine is perfect:Instead I have problems with
cross(below is just an example):So I'm forced to put
as number[]aftercross()or accessing the results ofeigs.What I'm doing wrong here? Or there is a reason cross is not defined as
cross<T>(T: a, T: b): T?Yes, I tried wit config, but nothing changes.
Thanks for clarifying!
mario
Beta Was this translation helpful? Give feedback.
All reactions