Something went wrong. Try again.
a tool for shared writing and social publishing
Something went wrong. Try again.
TypeScript
12345678910111213141516171819202122232425type PreferencesInput = { showComments?: boolean; showMentions?: boolean; showRecommends?: boolean; showPrevNext?: boolean;} | null;
export function mergePreferences( documentPrefs?: PreferencesInput, publicationPrefs?: PreferencesInput,): { showComments?: boolean; showMentions?: boolean; showRecommends?: boolean; showPrevNext?: boolean;} { return { showComments: documentPrefs?.showComments ?? publicationPrefs?.showComments, showMentions: documentPrefs?.showMentions ?? publicationPrefs?.showMentions, showRecommends: documentPrefs?.showRecommends ?? publicationPrefs?.showRecommends, showPrevNext: publicationPrefs?.showPrevNext, };}