View problem-with-ts-conditional-types-and-generics.ts
type Task<T> = () => T | Promise<T>; | |
type Mapper<T, R> = (instance: LoadingInstance<T>) => R; | |
interface LoadingInstance<T> { | |
result: T | undefined; | |
loading: boolean; | |
loadingError: Error | null; | |
reload: () => void; | |
} |
View gist:f2b7e44cfde3ddf30b4adb5519fe1301
### Keybase proof | |
I hereby claim: | |
* I am danfma on github. | |
* I am danfma (https://keybase.io/danfma) on keybase. | |
* I have a public key ASBKKEWNYtwUqbbmnquouMg2s4otEOMVOEqDW_zOJwhQoQo | |
To claim this, I am signing this object: |