ã¨ãããããã§ãã ãããã¨ãããã¯ãªã¨ã調ã¹ã¦ãè²ããªå ´é¢ã§ä½¿ããã¦ããã®ã§ã ãããã®ååããã£ããè¦ãã¦ããã¨æ¤ç´¢ã容æã«ãªãã¾ããã ç°¡åã«è¨ãã¨ï¼ hoge?.huga -> hoge ã undefined ãªã undefined hoge!.huga -> hoge ã undefined ã§ãªãã¨ä»®å®ãã¦å¼·å¶å®è¡ ã¡ãã£ã¨è©³ãã ã©ã¡ãããå¤æ°hogeãundefinedã§ããå¯è½æ§ãããæã«ä½¿ãã¾ãã ããããä¼¼ã¦ããè¨è¿°ã¨ç¨æ³ã§ãããªããã åä½ã¯å ¨ãã®çéã¨è¨ã£ã¦ãè¯ãæ¯ãèãããã¾ãã ä¾ãã°ä»¥ä¸ã®ä¾ã§ãã class Hoge { huga?: string } const hugaLength = () => { return new Hoge().huga.length // ã¨ã©ã¼ } hugaã¯undefinedã§ããå¯è½æ§ãããããã«ã lengthã«
{{#tags}}- {{label}}
{{/tags}}