Eric Haynes
Eric Haynes
Not that I want to shoot my own feature in the foot here, but that's a big scope expansion because the syntax you're using there isn't something that TS can...
> I want to discuss where this `infer Type` statement can be applied and what should be its semantic. The semantics of the `infer` keyword already exist with [conditional types](https://www.typescriptlang.org/docs/handbook/2/conditional-types.html#inferring-within-conditional-types):...
Agreed. I wish `mapActions` were exposed directly, but I did something like your first, but instead of current module's actions, taking both state and actions as parameters to make it...
@jaredpalmer Your async action increments the count twice, FYI. @davidchase Binding of `this` is a flaw in the javascript language, not unistore. You can just initialize all the actions as...
> The workaround in comment 1 doesn't work for me -- I wonder if it's running after the session is saved in my setup. I don't know much about the...
An implementation might look like this, which would "hoist" any synchronous errors into the async context. ```typescript export const fromThrowable = Promise, E>( fn: Fn, errorFn: (err: unknown) => E,...
Better late than never. I wasn't using this library for a while, but I added a PR for this.
> Make sure you have "type": "module" present in your package.json That is a **gigantic** undertaking if you don't have it there already. When libraries used in node decide to...
Hrmm, actually, no, v5 works with a commonjs project as well. `axios` has [dual publishing](https://github.com/axios/axios/blob/751133eb9ed794c6f6634c52f4fe116e33bf5f09/package.json#L6-L20), so it can be loaded either way. this works fine: ``` npm init npm i...
> I have not created this project as a "module" only initiative. The error suggests otherwise: > This file is being treated as an ES module because it has a...