No need to insult JavaScript. In two out of three times the "JavaScript" written will be something like:
interface Box<T> { value: T }
function map<T, U>(input: Box<T>, func: (value: T) => U): Box<U> {
return { value: func(input.value) }
}