Cannot assign to Type
This works fine in version
2.0.0-dev.19
. However, updating to 2.0.0-dev.20
or above it throws this error:
2 Replies
Type
accepts two generic parameters, the second of which is the current scope defaulting to {}
.
I had previously defaulted the scope to any
to avoid this kind of scenario and ensure all Type
instance were assignable to Type
with no params, but I think defaulting the scope to any
(meaning you can chain arbitrary keywords that don't exist) is more likely to cause problems:
Maybe I will add UnknownType
for that in the next release. In the meantime feel free to use Type<unknown, any>
which should allow all typesThanks, that works