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

TypeScript v3.7のおさらい / Learning TypeScript v3.7

5d769d109697012317c09c6a27a6a4bf?s=47 linyows
October 15, 2019

TypeScript v3.7のおさらい / Learning TypeScript v3.7

Fukuoka.ts #2 でお話しした資料です。Oct 15, 2019

5d769d109697012317c09c6a27a6a4bf?s=128

linyows

October 15, 2019
Tweet

Transcript

  1. Fukuoka.ts #2 TS TypeScript v3.7ͷ͓͞Β͍ Tomohisa Oda — GMO Pepabo,

    Inc. / Oct 15th 2019
  2. Fukuoka.ts #2 linyows / Tomohisa Oda GMO Pepabo, Inc.: Principal

    Engineer Blog: https://tomohisaoda.com 2
  3. Fukuoka.ts #2 3 Private Projects ΞϓϦέʔγϣϯࣗ਎͕ϦϙδτϦ͔Β࠷৽ͷίʔ υΛݕ஌ͯࣗ͠ಈͰσϓϩΠͱσϦόϦʔΛߦ͏ πʔϧ MJOVYͷVTFS໊લղܾΛ(JU)VCͷ5FBNϝϯόʔ΍ ϦϙδτϦͷΞΫηεݖݶऀ͔Βߦ͏πʔϧ

  4. Fukuoka.ts #2 ΋͏͙͢TypeScript v3.7 ͕ϦϦʔε ଟ෼དྷ݄ 4

  5. Fukuoka.ts #2 TypeScript v3.7ʹೖΔݴޠ࢓༷ͷมߋ • Assert Signatures • Recursive Type

    References • Top Level Await • Null Coalescing • Optional Chaining • Private-Named Instance Fields 5
  6. Fukuoka.ts #2 TypeScript v3.7ʹೖΔݴޠ࢓༷ͷมߋ • Assert Signatures • Recursive Type

    References • Top Level Await • Null Coalescing • Optional Chaining • Private-Named Instance Fields 6
  7. Fukuoka.ts #2 ΄΅TC39ͳͷͰ͕͢ΩϟονΞοϓ͍͖ͯ͠·͢:P 7

  8. Fukuoka.ts #2 Private-Named Instance Fields https://github.com/tc39/proposal-class-fields Stage 3 8

  9. Fukuoka.ts #2 Optional Chaining 9 https://github.com/tc39/proposal-optional-chaining Stage 3

  10. Fukuoka.ts #2 Null Coalescing 10 https://github.com/tc39/proposal-optional-chaining https://github.com/tc39/proposal-nullish-coalescing Stage 3

  11. Fukuoka.ts #2 Top Level Await 11 https://github.com/tc39/proposal-nullish-coalescing Stage 2 (Node

    REPL, Chrome debugger)
  12. Fukuoka.ts #2 12 Recursive Type References https://github.com/microsoft/TypeScript/pull/33050

  13. Fukuoka.ts #2 Assert Signatures 13 https://github.com/microsoft/TypeScript/pull/32695

  14. Fukuoka.ts #2 14 User defined Type Guardsͱࣅͯͳ͍ʁ

  15. Fukuoka.ts #2 15 User defined Type Guards

  16. Fukuoka.ts #2 User defined Type GuardsͱͲ͏ҧ͏ͷʁ w ܕड़ޠͱ͍͏ͱଞʹUser defined Type

    Guards͕͋͛ΒΕΔ w ͲͪΒ΋ίϯύΠϥʹܕΛ໌ࣔ͢Δ΋ͷ w Assert Signatures͸ɺ੍ޚϑϩʔղੳͷͨΊʹܕΛද໌͢Δ΋ͷͰɺUser defined Type Guards͸ɺܕਪ࿦ͷ֦ு w ࡶʹݴ͏ͱ໭Γ஋ͷҧ͍ User defined Type Guards͸BooleanɺAssert Signatures͸ܕද໌·ͨ͸ྫ֎ͷεϩʔ 16
  17. Fukuoka.ts #2 ·ͱΊ w TypeScript v3.7ʹೖΔ༧ఆͷݴޠ࢓༷Λ͓ͭ͞Β͍͠·ͨ͠ w Optional Chaining΍Null Coalescing΍Top

    Level AwaitͳͲͷศར࢓༷͸৽ ن͸΋ͪΖΜɺطଘͷίʔυΛ୹͘ॻ͖௚͢͜ͱ͕Ͱ͖ͦ͏Ͱ͢ w Assert Signatures͸Type Guardͱಉ͘͡ܕड़ޠͳͷͰॊೈੑͱҾ͖׵͑ʹܕ ҆શΛࣗ෼ͨͪͰ୲อ͢Δ͜ͱʹͳΓ·͢ w Recursive Type References͸Ͳ͏Ͱ͠ΐ͏ʢඞཁͳ৔໘ʹૺ۰ͨ͜͠ͱ͕ͳ ͍ʣ 17
  18. Fukuoka.ts #2 18 Thank You, We’re Hiring! ʮϖύϘΩϟϦΞ࠾༻ʯݕࡧ