You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On React Native, we have some functions which ask for a string | undefined type, for example Alert.alert(), or @react-navigation component attributes.
Since DefaultTFuncReturn returns a string | null value, Typescript raise a type assignation error (TS2322).
TS2322: Type 'DefaultTFuncReturn' is not assignable to type 'string | undefined'.
Can be solved with ?? undefined operator, but it is dirty and very redundant.
馃挜 Regression Report
On React Native, we have some functions which ask for a
string | undefined
type, for exampleAlert.alert()
, or @react-navigation component attributes.Since DefaultTFuncReturn returns a
string | null
value, Typescript raise a type assignation error (TS2322).Can be solved with
?? undefined
operator, but it is dirty and very redundant.Last working version
Worked up to version: 22.0.4
Stopped working in version: 22.0.5
To Reproduce
Steps to reproduce the behavior:
Expected behavior
No Typescript error.
Your Environment
The text was updated successfully, but these errors were encountered: