News for hackers. Stuff that matters.
Re:Announcing TypeScript 2.0 Beta by h_r on Thursday July 14, 2016 @09:31AM (#12093562)

  let lowerCased = (s : string[] | undefined) => s!.map((str : string) => str.toLowerCase());

  console.log(lowerCased(['A','B']));
  console.log(lowerCased(undefined)); //boom!
It doesn't coerce anything. All it does is let the code pass without error. "s!.map" and "s.map" compile to the exact same Javascript code, which means there is no type coercion going on. Are you sure you know what type coercion is? The first log prints out fine and the second blows up, which proves that undefined isn't being coerced to a string[]. If that was the case, the resulting JS would be checking for undefined and probably creating an empty array.
Re:Announcing TypeScript 2.0 Beta by johnfn on Friday July 15, 2016 @05:18PM (#12103916)
My bad, I meant conversion, not coercion.