TypeScript
// formatId returns a string id unchanged, but prefixes a numeric id with "#".
function formatId(id: string | number): string {

}

const a = formatId("abc123");
const b = formatId(42);