I have this:
const getDefaultState = () => ({
mainNotifMessage: '(unknown message)',
notifDetails: '(unknown notification details)',
severity: 'info' as 'info' | 'error' | 'warning' | 'success' | undefined,
snackBarOpen: true,
foo: Date.now() as any
});
export type NotifDefaultState = ReturnType<typeof getDefaultState>;
How can I tell t that I want the foo property to be optional? I tried this:
export type NotifDefaultState = ReturnType<typeof getDefaultState> & {ts?: any};
but no dice.