Closed oriSomething closed 11 months ago
So it seems, we can't do the same conversion 😑 because Parameters
and ReturnType
don't work with Function
. The other question is should we at least replace any
with unknown
to provide a bit stricter detentions
It seems also unknown
has some issues, I wonder if there is any TS wizard that can solve this issue, if it's possible
Is this still an issue?
It's still an issue, but I don't think it's fixable anyway
I saw this trick in React 18 types: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/56210/files#diff-32cfd8cb197872bcba371f5018185d2e75fa540b52cda2dd7d8ac12dcc021299R1068 And the discussion https://github.com/DefinitelyTyped/DefinitelyTyped/issues/52873#issuecomment-845806435
I think we should ban implicit any as well. The only issue is that it might be a breaking change, But I don't think so, from looking at
memoize-one
definitions. It might only force some users to add types or explicitany
.