#Store item = undefined, causes typescript error
4 messages · Page 1 of 1 (latest)
Are you trying to remove that entry from the store? delete items[item.id] is how you'd do that
Alright will try doing that.
In the docs it is mentioned that to remove a value from some object it should be set to undefined.
Oh good point, in that case the docs also say
In TypeScript, you can delete a value by using a non-null assertion, like
undefined!.