You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since Pinia uses the new feature Awaited with Typescript version 4.5, and peerDependencies in package.json constrains the Typescript version to >= 4.4.4, when the user Typescript version is 4.4.4 =< user version < 4.5 will report an error
Expected behavior
Everything works as it should
Actual behavior
ERROR in /Users/didi/Documents/code/didi/rainbow-ts-project/node_modules/pinia/dist/pinia.d.ts(701,80):
701:80 Cannot find name 'Awaited'.
699 |* value (other than `undefined`) to **override** the returned value.
700 |*/
> 701 | after: (callback: A extends Record<ActionName, _Method>? (resolvedReturn: Awaited<ReturnType<A[ActionName]>>) => void | ReturnType<A[ActionName]>| Awaited<ReturnType<A[ActionName]>>: () => void) => void;
| ^
702 | /**
703 |* Sets up a hook if the action fails. Return `false` to catch the error and
704 |* stop it fro propagating.
ERROR in /Users/didi/Documents/code/didi/rainbow-ts-project/node_modules/pinia/dist/pinia.d.ts(701,154):
701:154 Cannot find name 'Awaited'.
699 |* value (other than `undefined`) to **override** the returned value.
700 |*/
> 701 | after: (callback: A extends Record<ActionName, _Method>? (resolvedReturn: Awaited<ReturnType<A[ActionName]>>) => void | ReturnType<A[ActionName]>| Awaited<ReturnType<A[ActionName]>>: () => void) => void;
| ^
702 | /**
703 |* Sets up a hook if the action fails. Return `false` to catch the error and
704 |* stop it fro propagating.
Version: typescript 4.4.4
Additional information
pinia version: 2.0.9
typescript version: 4.4.4
The text was updated successfully, but these errors were encountered:
@posva I remember that in version 2.0.6 it was released to solve the typescript peer dep, relaxing the typescript peer version, the source of the problem was an issue #874 raised by sodatea, in version 2.0.9 is it necessary to release a minor version to solve the problem.
Reproduction
Since Pinia uses the new feature Awaited with Typescript version 4.5, and peerDependencies in package.json constrains the Typescript version to >= 4.4.4, when the user Typescript version is 4.4.4 =< user version < 4.5 will report an error
Expected behavior
Everything works as it should
Actual behavior
Additional information
pinia version: 2.0.9
typescript version: 4.4.4
The text was updated successfully, but these errors were encountered: