E.g.
interface State {
currentUser?: {
name: string
};
}
store('currentUser')('name');
Currently that causes a typescript error saying something like "never does not have a property 'name'". Instead make it work, and have the return type be Store<string | undefined>.