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

TypeScript入門 〜型のあるモダンなJavaScript〜

TypeScript入門 〜型のあるモダンなJavaScript〜

社内で開催したTypeScript入門の勉強会資料

Toshihisa Tomatsu

April 19, 2019
Tweet

More Decks by Toshihisa Tomatsu

Other Decks in Programming

Transcript

  1. ϑ ϩ ϯ τ Τ ϯ υ Τ Ω ε

    ύ ʔ τ ν ʔ Ϝ ֎ দ ढ़ ঘ TypeScriptೖ໳ ʙܕͷ͋ΔϞμϯͳJavaScriptʙ FrontendBar#6 2019/4/19ɹ
  2. ։ൃ؀ڥ(3Step) 1. $ npm i -D typescript 2. $ npx

    tsc —init 3. $ npx tsc src/**/*.ts 1. TypeScriptΛΠϯετʔϧ
 ίϯύΠϥͱͯ͠tsc͕ೖ͍ͬͯΔ 2. ઃఆϑΝΠϧ(tsconfig.json)ͷ਽ܗੜ੒ 3. TSϑΝΠϧΛίϯύΠϧɻJS͕ੜ੒͞ΕΔ Step 02 Step 03 Step 01
  3. @types ࣗ෼ͰෳࡶͳܕఆٛΛ͢Δඞཁ͸͋Γ·ͤΜ ͍͍ͩͨͷϥΠϒϥϦ͸ܕఆٛϑΝΠϧΛ༻ҙͯ͘͠Εͯ· ͢(Definitely Typed) ͦͷϑΝΠϧΛΠϯετʔϧ͢Δ͚ͩ ྫ͑͹ Reactͷ৔߹ $ npm

    install -D @types/react kintone CustomizeͳΒ@kintone/dts-gen https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types
  4. ʓʓ+TypeScript React + TypeScript Nodejs + TypeScript webpack + Babel

    + TypeScript jquery + TypeScript ReactNative + TypeScript Vue.js + TypeScript Anguler + TypeScript ɹɹɹɹɹɹɹɹɹɹɹɹetc جຊతʹͲ͜Ͱ΋࢖͑ΔΠϝʔδ
  5. •TypeScript Deep Dive ೔ຊޠ൛
 https://typescript-jp.gitbook.io/deep-dive/ •೔ຊޠͰTypeScirptΛҰ௨Γֶ΂Δ •TypeScriptͰkintoneΧελϚΠζ։ൃΛͯ͠ΈΑ͏
 https://developer.cybozu.io/hc/ja/articles/360023293091 •TypeScript࠶ೖ໳ ―

    ʮ͕Μ͹Βͳ͍TypeScriptʯͰɺ
 JavaScriptΛ“ॊΒ͔͍”੩తܕ෇͖ݴޠʹ
 https://employment.en-japan.com/engineerhub/entry/2019/04/16/103000 •࣮ࡍͷϓϩδΣΫτͰ࢖͏લʹಡΜͰ͓͘ͱྑ͍ TypeScript΍ͬͯ࣌͘ͷ͓͢͢Ί