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
If you specify Array<Store<string>> as the value for classList, typescript will show an error:
Type 'Store<string>' is not assignable to type 'string | Store<string | null>'.
Type 'Store<string>' is not assignable to type 'Store<string | null>'.
Types of property 'updates' are incompatible.
Type 'Event<string>' is not assignable to type 'Event<string | null>'.
Types of parameters 'payload' and 'payload' are incompatible.
Type 'string | null' is not assignable to type 'string'.
Type 'null' is not assignable to type 'string'.(2322)
pijng
changed the title
[forest] classList error with Array<Store<string>> as value
[forest] classList typings error with Array<Store<string>> as value
Aug 29, 2023
What is the current behavior:
If you specify
Array<Store<string>>
as the value for classList, typescript will show an error:Please provide the steps to reproduce and if possible a minimal demo of the problem via https://share.effector.dev, https://codesandbox.io or similar
Minimal reproduce:
https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAbwMZQKYEMaoMo2qgXzgDMoIQ4AiVY41JPKSgKFElkQFcBnYAOwDmAGjgALEdzD0ipclWL5uMFsx78BACgAmEJJxCo+MAHQBHTqigBPbKgA29RhsoAjCFquUAlAEIRGrzgAXgA+RGY4OCQIPiU4ABIkO3RubmCotEwcRlRnMBcAWgAWb2YIsWd0Sn9A0PDIyMl6DQRyhqjk1IAZYCUALjgAbUTO7gBdNrgCL3Lp5mmgA
What is the expected behavior:
As far as I can tell, there should be support for such cases at type level:
effector/packages/forest/index.d.ts
Line 12 in 9356aae
Which versions of effector packages, and which browser and OS are affected by this issue? Did this work in previous versions of effector?:
The text was updated successfully, but these errors were encountered: