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
The example below fails with Type instantiation is excessively deep and possibly infinite.(2589).
It's obvious that this problem is related to Currency variations. It works with 14 elements, but not more. I also tried 4.5.0-beta with Tail-Recursion Elimination but the result is the same.
Also, it could be workarounded via multiple arguments, but it leads to more verbose code.
import{createStore,combine}from'effector';typeCurrency='usd'|'eur'|'cny'|'uah'|'byn'|'thb'|'rub'|'azn'|'kzt'|'kgs'|'uzs'|'tzs'|'kes'|'zar'|'ron'|'mdl'|'ils'|'inr'|'pln'|'chf'|'gbp';constinitialValue='usd'asCurrency;const$currency=createStore<Currency>(initialValue)typeAutosearchTrigger={currency: Currency;};// Will fail with «Type instantiation is excessively deep and possibly infinite.»const$autosearchTrigger=combine<AutosearchTrigger>({currency: $currency,});const$autosearchTriggerViaTuple=combine<Currency,AutosearchTrigger>($currency,(currency)=>({
currency
}));
Missing/Incorrect APIs
The example below fails with
Type instantiation is excessively deep and possibly infinite.(2589)
.It's obvious that this problem is related to
Currency
variations. It works with 14 elements, but not more. I also tried 4.5.0-beta with Tail-Recursion Elimination but the result is the same.Also, it could be workarounded via multiple arguments, but it leads to more verbose code.
Playground Link: Provided
Relevant documentation
combine(...stores, fn) works
combine({ A, B, C }, fn?) doesn't work
The text was updated successfully, but these errors were encountered: