tl;dr ç¼è
ã«ã±ãã·ã®ãã©ãããã©ã¼ã ãã¼ã ã§ã½ããã¦ã§ã¢ã¨ã³ã¸ãã¢ããã¦ãããã¦ã«ãã (id:stefafafan) ã§ããä»åã¯ãç§ã TypeScript ãã¡ã¤ã³è¨èªã¨ãã¦æ¡ç¨ãã¦ãããã¼ã ã«åå ããéãè¨èªãå¨è¾ºæè¡ã®ãã£ããã¢ãããè¡ã£ãæ¹æ³ã«ã¤ãã¦ç´¹ä»ãã¾ãã ãã®è¨äºã¯ç§ã®æè¡ç¹é 2024ã® 3 è¨äºç®ã§ãã ãã®è¨äºã®æ³å®èªè ç§ãå ã æã£ã¦ããã¹ãã«ã»ãã èªç¥è² è·ã®å¢å TypeScript å¦ç¿ã®ããã«ãã£ãã㨠å¦ç¿ã®é²ãæ¹ ããã¯ãªã¼ãã¨ã® 1on1 ã®ä¸ã§å£æã¡ãç¸è« ãã¢ããã°ã©ãã³ã° 輪èªä¼ ããããä¼ å¦ç¿ã³ã³ãã³ã O'Reilly Online Learning ã使ã£ãå¦ç¿ TypeScript Deep Dive ãããç®æã人ã®ããã® TypeScript å ¥é å®å ¨ãªã³ã¼ãã®æ¸ãæ¹ããé«åº¦ãªåã®ä½¿ãæ¹ã¾ã§ type-challenges å ¬å¼ããã¥ã¡
TypeScriptã¯è¿å¹´JavaScriptã«ä»£ãã£ã¦Webããã³ãã¨ã³ãéçºã§å©ç¨ããã¦ããããã°ã©ãã³ã°è¨èªã§ããTypeScriptã¯éçºçç£æ§ããã³éçºè ä½é¨ã«åªãã¦ãããã¨ãããéçºç¾å ´ã§åºãæ¡ç¨ããã¦ãã¾ããTypeScriptãå¦ã¶ãã¨ã¯ãä»å¾ã®Webããã³ãã¨ã³ãéçºã§ã¯ãã»ã¼å¿ é ã¨ãã£ã¦è¯ãã§ãããããã®è¨äºã§ã¯TypeScriptã使ãã¡ãªããããªãã³ã«ãTypeScript Deep Dive æ¥æ¬èªçããæ´»ç¨ãã¦TypeScriptãçæéã§å¦ç¿ããæ¹æ³ãç´¹ä»ãã¾ãã ã¯ããã« çè ã¯SIeråºèº«ã®ITã¨ã³ã¸ãã¢ã§ããã²ã¼ã éçºä¼ç¤¾ãªã©ãçµç±ãã¦ç¾å¨ã¯ä¸è¬ä¼æ¥ã§ã¨ã³ã¸ãã¢ã¨ãã¦å¤åãã¦ãã¾ããã¯ããã¦TypeScriptã®éè¦ããç¥ã£ãã®ã¯ã2018å¹´ããã«ãTypeScript Deep Diveããèªãã ã¨ãã§ãããããã¦ãä»å¾å¿ ãå¤ãã®äººã«å½¹ç«ã¤ã¨èãããªãª
Table of Contents:· Table of Contents: · How to type React props â Creating a type alias for the props â Typing optional props â List of types for React component props · How to type React function components · How to type React hooks â Typing useState hook â Typing useEffect and useLayoutEffect hooks â Typing useContext hook â Typing useRef hook â Typing useMemo hook â Typing useCallback hook â T
TypeScriptåå ¥é â ãããã°ããªãTypeScriptãã§ãJavaScriptãâæãããâéçåä»ãè¨èªã« JavaScriptããã¸ã§ã¯ãã§TypeScriptãå°å ¥ããéã«ã¯ãâæãããâéçåä»ãè¨èªã¨ããã®ãããããã§ããè¤å¾éï¼gfxï¼ãããã¾ã¨ãããããã°ããªãTypeScriptãã®ã¬ã¤ãã©ã¤ã³ã§ãã TypeScriptã¯ããã¹ã¦ã®JavaScriptããã¸ã§ã¯ãã§æ¡ç¨ãã価å¤ã®ããæè¡ã§ããTypeScriptã¨ããã«å¯¾å¿ããã¨ãã£ã¿ãå°å ¥ãããã¨ã§ãè£å®ãåãã¼ã¹ã®æ´åæ§ã®ãã§ãã¯ã«ããããã¹ã¦ã®ããã¸ã§ã¯ãã§çç£æ§ãä¸ããã¾ããã¾ããªãã¡ã¯ã¿ãªã³ã°ã容æã«ãªãã®ã§ãé·æãããã¯å¤§è¦æ¨¡ãªããã¸ã§ã¯ãã§ãå質ãä¿ã¡ããããªãã¾ãã ãã®è¨äºã§ã¯ãTypeScriptã«ã¤ãã¦æä½éã®ç¥èã¨ã¨ãã«ããµã¯ãã¨ï¼ã©ã¡ããã¨ããã¨æ¢åã®ããã¸ã§ã¯ãã«ï¼å°å ¥ããããã®
ãTypeScriptãã¨ã¯ãJavaScriptã«ãåããæå®ã§ãããªã¼ãã³ã½ã¼ã¹ã®ããã°ã©ãã³ã°è¨èªã§ããåã«ããããã°ã©ã å®è¡åã«ã¨ã©ã¼ãè¦ã¤ãåºããã¨ãã§ããããã大è¦æ¨¡ãªããã¸ã§ã¯ããå®å ¨ã«éçºã§ãã¾ããMicrosoft社製ã§ãå¤ãã®ããã³ãã¨ã³ãã¨ã³ã¸ãã¢ã«æ¡ç¨ããã¦ãã¾ãã TypeScriptã®ã¢ãã³ãªãã«ãç°å¢ãä½ãããã«ã¯webpackãGulp.jsããã使ããã¦ãã¾ãããè¨å®ãã¡ã¤ã«ãå¿ è¦ã§å¦ç¿ã³ã¹ãã¯é«ãã§ãããTypeScriptã®ãã«ãç°å¢ãã»ããã ããªã®ã«ããªããã¼ã«ã®è¨å®ã«æéãã¨ãããã®ãï¼ããTypeScriptãå§ããã¨ãã«è¦å´ããããªããã¨æã£ã¦ãã人ãå¤ãã®ã§ã¯ãªãã§ããããï¼ ãParcelãã¼ã»ã«ãã¨ãããã¼ã«ã使ãã¨ãç¬èªã®è¨å®ãã¡ã¤ã«ã使ããã¨ãªãTypeScriptã®ã¢ãã³ãªãã«ãç°å¢ãããã3ã¹ãããã§ä½ãã¾ãã â¼ TypeScr
Transcript 3FBDU���5ZQF4DSJQUͷ⨠ØÚ¥ßà®Í±à£®à«·5JQT wTBLJUP !@@TBLJUP@@ � w'SPOU�&OE�&OHJOFFS� w3FBD XFCQBDL (BUTCZ+4� w&WFOU� w#POpSF�'SPOUFOE� w3FBDU�NFFUVQ� w*OTJEF�'SPOUFOE� *OTJEF�'SPOUFOE���ͷ$'1ืà¥à®¤ÊÊ⨠IUUQT���EPDT�HPPHMF�DPN�GPSNT�E�F� �'"*Q2-4q17/@�435:#�OK%��5"(8CM,D�;6H�2W'Z�#G(X9q%��@H�WJFXGPSN ÎδΣϯμ wDSFBUF�SFBDU�BQQ� wBXFTPNF�UZQFTDSJQU�MPBEFS� wUT�MPBEFS� w!CBCFM�QSFTFU�UZQFTDSJQU� w࣮૷5JQTÎà¦Ê
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}