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
Look up the Union type of the 'path' argument (initModule method)
An error appears about the incompatibility of the types of arguments for the registerModule method, the typing of this method does not support the use of the Union type: string | string[]
Support Union type: string | string[] given the already described type overloads of the registerModule method, the following errors will be eliminated when resolving the conflict:
1. Argument of type "string | string[]" is not assignable to parameter of type "string[]".
2. Argument of type "string | string[] is not assignable to parameter of type "string".
What is actually happening?
When comparing the type "string | string[]", an error about type incompatibility is thrown, but given the type overloads, it should be possible to put an argument with the union type.
The text was updated successfully, but these errors were encountered:
Version
3.6.2
Reproduction link
codesandbox.io/s/umtsos
Steps to reproduce
Look up the Union type of the 'path' argument (initModule method)
An error appears about the incompatibility of the types of arguments for the registerModule method, the typing of this method does not support the use of the Union type:
string | string[]
Familiarize yourself with the typing of this method by reference and match the union type to the two method declarations:
https://github.com/vuejs/vuex/blob/3.x/types/index.d.ts
For more information, use the resource:
https://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html#use-union-types
What is expected?
Support Union type: string | string[] given the already described type overloads of the registerModule method, the following errors will be eliminated when resolving the conflict:
What is actually happening?
When comparing the type "string | string[]", an error about type incompatibility is thrown, but given the type overloads, it should be possible to put an argument with the union type.
The text was updated successfully, but these errors were encountered: