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

suppress-ts-errors を使って TypeScriptの型チェックを漸進的に強化する / Introducing-suppress-ts-errors

ryo
June 15, 2022

suppress-ts-errors を使って TypeScriptの型チェックを漸進的に強化する / Introducing-suppress-ts-errors

2022/06/15 Frontend LT回#7

ryo

June 15, 2022
Tweet

More Decks by ryo

Other Decks in Technology

Transcript

  1. TVQQSFTTUTFSSPSTΛ࢖ͬͯ
    5ZQF4DSJQUͷܕνΣοΫΛ઴ਐత
    ʹڧԽ͢Δ
    'SPOUFOE-5ճ

    View full-size slide

  2. !,BXBNBUB3ZP
    🔥ݩফ๷࢜
    👨💻&OHJOFFS!-"13"4JOD
    ❤5ZQF4DSJQU 7VF 'JSFCBTF 1ZUIPO
    💪झຯݒਨ ݸਓ։ൃ

    View full-size slide

  3. ࠓ೔࿩͢͜ͱ
    ɾTVQQSFTTUTFSSPSTͷ঺հ
    ɾ։ൃͷ;Γ͔͑Γ

    View full-size slide

  4. TVQQSFTTUTFSSPSTͱ͸ʁ

    View full-size slide

  5. 5ZQF4DSJQUͷܕΤϥʔൃੜՕॴʹɺ
    !UTFYQFDUFSSPSͷίϝϯτΛૠೖͯ͠
    ܕΤϥʔΛແޮԽ͢Δ$-*πʔϧ
    🛠ػೳ

    View full-size slide

  6. 5ZQF4DSJQUͷܕΤϥʔൃੜՕॴʹɺ
    !UTFYQFDUFSSPSͷίϝϯτΛૠೖͯ͠
    ܕΤϥʔΛແޮԽ͢Δ$-*πʔϧ
    🛠ػೳ
    !UTFYQFDUFSSPS͸࣍ߦͷܕΤϥʔΛ཈੍͢Δɻ͔
    ͭɺ΋࣍͠ߦʹܕΤϥʔ͕ͳ͘ͳͬͨ৔߹͸ɺ!UT
    FYQFDUFSSPSࣗମ͕ΤϥʔʹͳΔ

    View full-size slide

  7. 🛠ػೳ
    54 549ͳͲจ຺ΛΈͯద੾ͳίϝϯτ͕ૠೖ͞ΕΔ

    View full-size slide

  8. 5ZQF4DSJQUԽΛ͢͢ΊΔաఔͰͷδϨϯϚΛ
    ղফ͠ɺ઴ਐతʹܕΤϥʔΛ౗͍ͯͨ͘͠Ί
    🛠։ൃཧ༝

    View full-size slide

  9. $*ͰܕνΣοΫΛ࣮ߦͯ͠ɺ
    ৽نίʔυʹܕΤϥʔ͕
    ࠞೖ͢Δ͜ͱ͸๷͍͗ͨ
    🙈5ZQF4DSJQUԽͷδϨϯϚ
    طଘͷίʔυʹܕΤϥʔ͕ଟ
    ͗ͯ͢ɺڧ͍ܕνΣοΫͷઃ
    ఆͰ$*Λ௨͢͜ͱ͕Ͱ͖ͳ͍
    74

    View full-size slide

  10. $*ͰܕνΣοΫΛ࣮ߦͯ͠ɺ
    ৽نίʔυʹܕΤϥʔ͕
    ࠞೖ͢Δ͜ͱ͸๷͍͗ͨ
    🙈5ZQF4DSJQUԽͷδϨϯϚ
    طଘͷίʔυʹܕΤϥʔ͕ଟ
    ͗ͯ͢ɺڧ͍ܕνΣοΫͷઃ
    ఆͰ$*Λ௨͢͜ͱ͕Ͱ͖ͳ͍
    74
    ݁Ռɺ؇͍ܕνΣοΫͷ··
    $*Λ࣮ߦ͢Δ͜ͱʹͳΓɺ͍ͭ·
    Ͱ΋ܕνΣοΫΛڧԽͰ͖ͳ͍

    View full-size slide

  11. طଘܕΤϥʔΛҰ౓ʹશͯແޮ
    ԽͰ͖ΔͷͰɺڧ͍ܕνΣοΫ
    Ͱ΋$*Λ௨ͤΔ
    ✅TVQQSFTTUTFSSPSTͰͷղܾ
    ৽نίʔυ͸ڧ͍ܕνΣοΫͰ
    कΒΕͨঢ়ଶΛҡ࣋Ͱ͖Δɻ

    View full-size slide

  12. طଘܕΤϥʔΛҰ౓ʹશͯແޮ
    ԽͰ͖ΔͷͰɺڧ͍ܕνΣοΫ
    Ͱ΋$*Λ௨ͤΔ
    ✅TVQQSFTTUTFSSPSTͰͷղܾ
    طଘίʔυͷ!UTFYQFDUFSSPS
    Λॱ࣍ফͯ͠ߦ͚͹઴ਐతʹ
    ܕΤϥʔΛվળग़དྷΔ
    ৽نίʔυ͸ڧ͍ܕνΣοΫͰ
    कΒΕͨঢ়ଶΛҡ࣋Ͱ͖Δɻ

    View full-size slide

  13. %&.0🧑💻

    View full-size slide

  14. ࢓૊Έɾ޻෉

    View full-size slide

  15. UTNPSQIͰ5ZQF4DSJQU$PNQJMFS"1*
    Λૢ࡞͠ܕΤϥʔΛऔಘ
    ࢓૊Έ

    View full-size slide

  16. 5ZQF4DSJQU$PNQJMFS"1*ͱ͸ʁ
    UTD͕಺෦తʹߦ͍ͬͯΔ͜ͱΛϓϩάϥϜ͔Βݺͼग़͢"1*ɻ
    "45Λૢ࡞ͯ͠ίʔυͷ੩తղੳ΍ॻ͖׵͑ɺग़ྗ͕ߦ͑Δɻ

    View full-size slide

  17. UTNPSQIͱ͸ʁ
    5ZQF4DSJQU$PNQJMFS"1*Λϥοϓͯ͠ɺ࢖͍΍͍͢"1*Λ
    ఏڙͯ͘͠ΕΔϥΠϒϥϦ
    ϑΝΠϧͷ*0ɺ&SSPSͷऔಘ΍ίʔυ
    ͷτϥόʔεɺॻ͖׵͑ͳͲɺ
    Α͘࢖͏"1*͕੔උ͞Ε͍ͯΔɻ

    View full-size slide

  18. ͲͷΑ͏ʹίϝϯτΛ௥Ճ͍ͯ͠Δͷʁ
    TSDMJCTVQQSFTTUTFSSPSTUT

    View full-size slide

  19. ͲͷΑ͏ʹίϝϯτΛ௥Ճ͍ͯ͠Δͷʁ
    TSDMJCTVQQSFTTUTFSSPSTUT
    ϑΝΠϧͷςΩετΛऔಘͯ͠ɺ
    ߦ͝ͱͷίʔυ഑ྻʹ֨ೲ

    View full-size slide

  20. ϑΝΠϧΛղੳͯ͠ܕΤϥʔͷ
    "45/PEFΛॱ࣍औಘ
    ͲͷΑ͏ʹίϝϯτΛ௥Ճ͍ͯ͠Δͷʁ
    TSDMJCTVQQSFTTUTFSSPSTUT

    View full-size slide

  21. TSDMJCTVQQSFTTUTFSSPSTUT
    ͲͷΑ͏ʹίϝϯτΛ௥Ճ͍ͯ͠Δͷʁ
    ૠೖҐஔͷจ຺ɺܕΤϥʔͷछผʹ
    ߹ΘͤͯίϝϯτΛ࡞੒
    UTYͷ৔߹͸AAͰ͸ͳ͘A\^A
    ͰͷίϝϯτΞ΢τʹͳΔͳͲ

    View full-size slide

  22. TSDMJCTVQQSFTTUTFSSPSTUT
    ͲͷΑ͏ʹίϝϯτΛ௥Ճ͍ͯ͠Δͷʁ
    ࡞੒ͨ͠ίϝϯτΛɺ
    อ͍࣋ͯͨ͠ߦ͝ͱͷίʔυ഑ྻ
    ͷద੾ͳҐஔʹ௥Ճ

    View full-size slide

  23. TSDMJCTVQQSFTTUTFSSPSTUT
    ͲͷΑ͏ʹίϝϯτΛ௥Ճ͍ͯ͠Δͷʁ
    ࠷ऴతʹίϝϯτ͕௥Ճ͞Εͨ
    ߦ͝ͱͷίʔυ഑ྻΛKPJOͯ͠ɺ
    ܕΤϥʔ͕ίϝϯτΞ΢τ͞Εͨ
    ϑΝΠϧςΩετΛऔಘ

    View full-size slide

  24. 5ZQF4DSJQUɺ549͚ͩͰͳ͘
    7VFͷ4'$ʹ΋ରԠ
    ޻෉

    View full-size slide

  25. %&.0🧑💻

    View full-size slide

  26. Ͳ͏΍ͬͯ7VFͷ4'$ʹରԠ͍ͯ͠Δʁ
    TSDIBOEMFSTWVF)BOEMFSUT

    View full-size slide

  27. Ͳ͏΍ͬͯ7VFͷ4'$ʹରԠ͍ͯ͠Δʁ
    HMPCQBUUFSOͰ
    fi
    MFΛऔಘ
    fi
    MFͷGFBE'JMFͰಡΈऔΓɺ
    TDSJQUMBOHlUTzͷ಺෦ͷ
    ςΩετΛநग़
    TSDIBOEMFSTWVF)BOEMFSUT

    View full-size slide

  28. Ͳ͏΍ͬͯ7VFͷ4'$ʹରԠ͍ͯ͠Δʁ
    ϓϩδΣΫτ಺ͷUTDPO
    fi
    HKTPOΛݩ
    ʹUTNPSQIͷ1SPKFDUΛ࡞੒ɻ
    ͦͷ಺෦ʹઌఔநग़ͨ͠7VFͷεΫ
    Ϧϓτ෦෼Λ54ϑΝΠϧͱͯ͠௥Ճ
    TSDIBOEMFSTWVF)BOEMFSUT

    View full-size slide

  29. Ͳ͏΍ͬͯ7VFͷ4'$ʹରԠ͍ͯ͠Δʁ
    ͦͷ54ϑΝΠϧʹରͯ͠ɺܕνΣο
    Ϋͱίϝϯτͷ௥ՃΛ࣮ߦɻ
    ৽͍͠TDSJQUͰ7VFͷ4'$Λஔ׵
    TSDIBOEMFSTWVF)BOEMFSUT

    View full-size slide

  30. ࣮ࡍͷӡ༻

    View full-size slide

  31. -"13"4Ͱ࣮ࡍʹར༻
    5ZQF4DSJQUͷܕڧԽʹߩݙ

    View full-size slide

  32. TVQQSFTTUTFSSPSΛ࣮ߦͨ͠13
    TUSJDUUSVFʹͯ͠ɺ
    54ͷόʔδϣϯΞοϓ

    View full-size slide

  33. !UTFYQFDUFSSPSΛ౗͢13
    Τϥʔछผ͝ͱʹॱ࣍
    ౗͍͍ͯͬͯ͠Δ

    View full-size slide

  34. ܕΤϥʔղফͷਪҠ
    !UTFYQFDUFSSPSͷ਺54&SSPSͷ਺Λఆظܭଌɻઈࢍվળதʂʂ

    View full-size slide

  35. ɾTVQQSFTTUTFSSPST࢖ͬͯͶ
    ɾ5ZQF4DSJQU$PNQJMFS"1*͸ศར
    ɾࣗ෼Ͱ࢖͏πʔϧΛ࡞Δͷ͸ָ͍͠

    View full-size slide

  36. WE ARE HIRING !!

    View full-size slide