Skip to content

Instantly share code, notes, and snippets.

@kenmori
Last active September 18, 2019 05:19
Show Gist options
  • Save kenmori/3834d26ec960c2d5ec55435c6ac6147f to your computer and use it in GitHub Desktop.
Save kenmori/3834d26ec960c2d5ec55435c6ac6147f to your computer and use it in GitHub Desktop.
[TypeScript] saga-effect select return undefined redux-saga 1.0.0

[TypeScript3.6.3] saga-effect select return undefined redux-saga 1.0.0

If the return type of saga select becomes undefined when you upgrade to TypeScript 3.6.3

const editingEntry: EditingEntry = yield select(editingEntrySelector); // type is undefined. not EditingEntry
const entry = validateEntry(editingEntry); // compile error.  

To fix

Update react-saga to 1.1.1 https://github.com/redux-saga/redux-saga/releases/tag/v1.1.1

kenmori

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment