Typescript
åæ© ã¿ãã«åãé£çµããããªãã¨ãã¯ããã¾ãããï¼ä¾ãã°ä»¥ä¸ã®ãããªã±ã¼ã¹ãèãã¾ã // 2ã¤ã¿ãã«ãåå¨ãã¦ãã¾ã const t1 = [1, "aaa"] as const; // readonly [1, "aaa"] å const t2 = [true, () => {}] as const; // readonly [true, () => void]â¦
C++erã«ã¯ã馴æã¿ã®åã§éä¹ã§ãã Typescriptã¯Conditional Typeã¨ããåå®ç¾©ã«æ¡ä»¶åå²ãä»ããæ©è½ããããã¾ãåãå帰çã«å®ç¾©ã§ãã¾ããããã¦string literalãnumber literalãåã¨ãã¦ä½¿ããã¨ãåºæ¥ã¾ããã¤ã¾ãä½ã§ãã§ãã¾ãã*1 ã³ã¼ã import â¦