å§ã TSãåãã¦åå¼·ããã¨ãã«ãtypeããinterfaceã使ãããã«ï¼ãã¨ããããã°ãããè¦ã¾ããããæ¥åã®æã¯å ¨é¨typeã§åãå®ç¾©ãã¦ã¾ãããããï¼ã¨ç念ã«æã£ã¦ã¾ããã®ã§ãè¨äºã§ã話ããã¦ããã ãã¾ãã 1. åã®å®ç¾© TSã§ä¸çªæã£åãæ©ãåãå®ç¾©ã§ããæ¹æ³ã¯å¤åããã ã¨æãã¾ãã let level: number = 15; level = 15 level = "åäº" //Type 'string' is not assignable to type 'number' ãã®ããã«å®£è¨æã®å¤æ°ã«æ¹ã®æ³¨éãã¤ãããã¨ãåã¢ããã¼ã·ã§ã³(Type Annotation)ã¨è¨ãã¾ããä¸ã®ä¾ã ãè¦ããç¹ã«åé¡ãªãããã«è¦ãã¾ãããã³ã¼ããå°ãã§ãè¤éã«ãªã£ããåé¡ãããã¾ãã
{{#tags}}- {{label}}
{{/tags}}