Created
October 24, 2017 11:13
-
-
Save wildeyes/fa0dd7a30f6134c16286f14fdd9ca533 to your computer and use it in GitHub Desktop.
Lying to the typesystem
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// const getPortfoliosSync = createActionWithoutAlsoTyingDispatch(() => ({})); | |
const createActionWithoutAlsoTyingDispatchAsync = <T>(getMeAPromise: () => Promise<T>) => { | |
const retValue: any = () => { | |
return; | |
}; | |
return retValue as Promise<T>; | |
}; | |
const getPortfoliosAsync = createActionWithoutAlsoTyingDispatchAsync(() => Promise.resolve(1)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment