const colors = ["赤","é"] as const; type Colors = typeof colors[number]; //"赤" | "é" typeof colors[number]・・・ã£ã¦ãã©ï½ï½ï½ï½ï½ typeofã¯ããããã¹ã²ã¼ããããã TypeScritã®ä¸çã§ã¯ãtypeofã§å¤æ°ããåãä½ãããã ããªã¡ ã ãnumberã£ã¦ã®ã¯ã©ãããäºã ããï½ï½ï½ï½ã£!? é åã«numberã渡ãããã£ã¤ã¼ã®ãâââââââã!! ãã¡ããã£ã¦ãã®åã¡!! è¶ ã¤ã©ã¤ãããï½ï½ï½ï½ã!! 解説 ããã¯ãã© ãLookup Typeãã£ã¦ãã¤ããããã ãã¨ãã°ãã© ðã¿ããã«æ¸ãã¨Personåããããããã£ã®åãåãåºããããªã¡ï½?? type Person = { name: string, age: number } type name = Person

{{#tags}}- {{label}}
{{/tags}}