4 Replies
That makes sense because the type of
stored
is Map<string, SESSIONInterface["session" | ... | ...]>>
So according to your type, every value in that map could be any of the types.
Is there a particular reason you store them in separate keys btw>no
other than not knowing if it will merge or replace
If you always save the entire object, you should be good.
You couldve typed in like so: type OptionsFlags<Type> = {
[Property in keyof Type]: Type[Property];
};
Is there an actual way of typing it currently on my side that removes the error?