TypeScriptãç¨ããéçºã§ã¯ããã®åã·ã¹ãã ãæ´»ããã¦ã©ã³ã¿ã¤ã ã¨ã©ã¼ãäºåã«é²ãã ããå®è£ æ¼ããé²ãã ãã¨ã³ã¼ãã®å®å ¨æ§ã®åä¸ãå³ããã¨ãã§ãã¾ãã æ¬è¨äºã§ã¯ãå人çã«ç¥ã£ããããã§ã³ã¼ãã®å®å ¨æ§ãå¢ããï¼ã¨æããtipsãã¾ã¨ãã¾ããã â» ãªããlinterãç¨ããã³ã¼ãã®å®å ¨æ§åä¸ãé常ã«æå¹ã§ããããã®è¨äºã§ã¯ä¸»ã«TypeScriptã®åã·ã¹ãã ã«ç¦ç¹ãå½ã¦ã¦ãã¾ãã tipsé é åå¨ãã®tips ã¾ãã¯é åãæ±ãéã«å½¹ç«ã¤ãtipsãç´¹ä»ãã¾ãã é åããUnionåãä½æãã âã®ããã«(typeof array)[number]ã§é åã®å ¨è¦ç´ ãæã¤Unionåãä½æã§ãã¾ãã const fruits = ["apple", "banana", "lemon"] as const; type Fruit = (typeof fruits)[number]; //
{{#tags}}- {{label}}
{{/tags}}