export function coerceArray(x: A | Array): Array { return Array.isArray(x) ? x : [x] } export function capitalise0(name: undefined): undefined export function capitalise0(name: string): string export function capitalise0(name?: string) { return name && name[0].toUpperCase() + name.slice(1) }