Closed tanishqkancharla closed 1 year ago
Fix TupleTransactionApi.set type.
TupleTransactionApi.set
Before, it type-checked to have the wrong value assigned to a tuple:
type Schema = { key: ["0"] value: true } | { key: ["1"] value: false } // ... // this used to type-check tx.set(["0"], false)
Now, it throws a type error, and the value needs to correspond to the right key.
Am I missing something? Is there a reason this wasn't done already?
Huh, I wonder why it works one way but not the other way...
You know, you can use // @ts-error and stuff like that along to make certain type assertions in a test file... That would be cool.
// @ts-error
Fix
TupleTransactionApi.set
type.Before, it type-checked to have the wrong value assigned to a tuple:
Now, it throws a type error, and the value needs to correspond to the right key.
Am I missing something? Is there a reason this wasn't done already?