export function setItem(k: string, v: string): void { return localStorage.setItem(k, v) } export function getItem(k: string): string | null export function getItem(k: string, defaultValue: any): string export function getItem(k: string, defaultValue?: any): string | null { const val = localStorage.getItem(k) if (defaultValue !== undefined && val === null) { return defaultValue } return val }