Julien Wajsberg
Julien Wajsberg
Yeah, if you can help to find what doesn't work in the try I mentioned above, it would help a lot. We should have errors in that try but we...
Otherwise I can just remove these test cases so that we can land this already.
I think we can't do this. We really want to extract the type because that's what we pass to these functions. Eg if a mock function returns a `Promise`, we...
> Maybe we can do something similar here, converting JestMockFn to a class or an interface. I tried it and stumbled on https://github.com/facebook/flow/issues/5437
I see https://github.com/flow-typed/flow-typed/pull/2396 reused part of this PR to land the feature. I'm a bit surprised that it didn't use `ExtractPromiseType` though. And I find issues on my end for...
OK I find that the typings are failing for things like: ```js foo.doAsyncStuff = jest .fn() .mockResolvedValueOnce(10) .mockResolvedValueOnce(42); foo.doAsyncStuff = jest.fn(); foo.doAsyncStuff.mockRejectedValueOnce(new Error("hello world")); ``` Using a type closer to...
This is my current try: https://github.com/flow-typed/flow-typed/compare/master...julienw:jest-resolved-values-fix?expand=1 Various tests are failing... the 2 I was mentioning above, plus new tests failing in latest 2 flow versions :/
I haven't tried, but wouldn't the following work: Instead of ```js export const testExplicitSelector = createSelector( (state: State) => state.x, (x) => x + 1 ); ``` do: ```js export...
This is weird, we have no problem at all with latest flow. We do type our selector functions with this type: https://github.com/firefox-devtools/profiler/blob/ef2ba4da9e63653a8686e9d63957a2353f659d51/src/types/store.js#L29 Maybe this makes it work magically ?
> @julienw `type Selector = State => T` would do absolutely nothing to ensure type correctness of everything in a reselect selector, it's not really relevant to this issue As...