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
import{select}from'typed-redux-saga/macro';constgetToken=(state: RootState)=>state.user.account?.token;// type: (...) => string | undefinedfunction*fetchAlertsSaga(){consttoken=yieldselect(getToken);// TypeScript error here // TS7057: 'yield' expression implicitly results in an 'any' type because // its containing generator lacks a return-type annotation.// ...}
babel-plugin-macros is installed via react-scripts dependencies:
babel-plugin-macros
is installed viareact-scripts
dependencies:What I do wrong? Should I configure macro somehow?
If I switch import of
typed-redux-saga/macro
to thetyped-redux-saga
and add'*'
to the yields, the correct type is inferred:The text was updated successfully, but these errors were encountered: