Problem
// something is wrong
function reverse(s: String): String;
Don’t ever use the types Number, String, Boolean, or Object. These types refer to non-primitive boxed objects that are almost never used appropriately in JavaScript code. Instead of Object, use the non-primitive object type.
Consider:
function reverse(s: string): string;