Upgrade to Pro — share decks privately, control downloads, hide ads and more …

TS5.4と5.5のいいやつ

 TS5.4と5.5のいいやつ

Transcript

  1. function doSomething(names: string[], word: string | undefined) { if (word

    === undefined) { word = "hello!!"; } return names.map(name => `${name} ${word.toUpperCase()}`) }
  2. function doSomething(names: string[], word: string | undefined) { if (word

    === undefined) { word = "hello!!"; } return names.map(name => `${name} ${word.toUpperCase()}`) }