{"id":1910,"date":"2026-01-10T14:17:06","date_gmt":"2026-01-10T05:17:06","guid":{"rendered":"https:\/\/route-zero.com\/recruit\/?post_type=route&#038;p=1910"},"modified":"2026-03-10T14:17:18","modified_gmt":"2026-03-10T05:17:18","slug":"typescript%e5%9e%8b%e5%ae%9a%e7%be%a9%e8%87%aa%e5%8b%95%e5%8c%96%e3%80%8ckeyof-typeof%e3%80%8d%e5%ae%9f%e8%b7%b5%e4%be%8b%e3%81%a8%e4%ba%8c%e9%87%8d%e7%ae%a1%e7%90%86%e8%a7%a3%e6%b6%88%e6%b3%95","status":"publish","type":"route","link":"https:\/\/route-zero.com\/recruit\/route\/1910\/","title":{"rendered":"TypeScript\u578b\u5b9a\u7fa9\u81ea\u52d5\u5316\u300ckeyof typeof\u300d\u5b9f\u8df5\u4f8b\u3068\u4e8c\u91cd\u7ba1\u7406\u89e3\u6d88\u6cd5"},"content":{"rendered":"<div>\n<h2>\u306f\u3058\u3081\u306b\uff5c\u3053\u306e\u8a18\u4e8b\u3067\u5f97\u3089\u308c\u308b\u4fa1\u5024<\/h2>\n<p>\n    \u300c\u5b9a\u6570\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u66f4\u65b0\u3059\u308b\u305f\u3073\u306b\u3001\u578b\u5b9a\u7fa9\u3082\u624b\u52d5\u3067\u76f4\u3059\u2026\u6b63\u76f4\u3001\u3053\u308c\u3063\u3066\u7121\u99c4\u3058\u3083\u306a\u3044\u3067\u3059\u304b\uff1f\u300d<br \/>\n    \u79c1\u305f\u3061\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u30a8\u30f3\u30b8\u30cb\u30a2\u304cReact\u3084Next.js\u3067\u958b\u767a\u3057\u3066\u3044\u308b\u3068\u3001<strong>\u578b\u5b9a\u7fa9\u306e\u4e8c\u91cd\u7ba1\u7406<\/strong>\u306b\u30e2\u30e4\u30e2\u30e4\u3059\u308b\u77ac\u9593\u304c\u3088\u304f\u3042\u308a\u307e\u3059\u3002<br \/>\n    \u7279\u306b\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u304c\u5927\u304d\u304f\u306a\u308b\u307b\u3069\u3001\u4fee\u6b63\u6f0f\u308c\u306b\u3088\u308b\u30b3\u30f3\u30d1\u30a4\u30eb\u30a8\u30e9\u30fc\u3084\u5b9f\u884c\u6642\u30d0\u30b0\u306e\u30ea\u30b9\u30af\u304c\u9ad8\u307e\u308a\u307e\u3059\u3002<br \/>\n    \u300cDRY\u539f\u5247\uff08Don&#8217;t Repeat Yourself\uff09\u300d\u3092\u91cd\u8996\u3059\u308b\u73fe\u5834\u30a8\u30f3\u30b8\u30cb\u30a2\u306b\u3068\u3063\u3066\u3001\u540c\u3058\u60c5\u5831\u30922\u7b87\u6240\u306b\u66f8\u304f\u624b\u9593\u3068\u30ea\u30b9\u30af\u306f\u898b\u904e\u3054\u305b\u307e\u305b\u3093\u3002<br \/>\n    \u3067\u3082\u3001<strong>TypeScript<\/strong>\u306b\u306f\u3053\u306e\u201c\u6ce5\u81ed\u3044\u4f5c\u696d\u201d\u3092\u4e00\u6383\u3059\u308b<strong>\u9b54\u6cd5\u306e1\u884c<\/strong>\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u305d\u308c\u304c<strong>keyof typeof<\/strong>\u3067\u3059\u3002<br \/>\n    \uff08TypeScript\u306e\u57fa\u790e\u3084\u5c0e\u5165\u65b9\u6cd5\u306b\u3064\u3044\u3066\u306f\u300e<a href=\"https:\/\/route-zero.com\/recruit\/route\/1291\">TypeScript\u306e\u59cb\u3081\u65b9\uff5cNode.js\u3068VSCode\u3067\u5b66\u3076\u958b\u767a\u74b0\u5883\u69cb\u7bc9\u30ac\u30a4\u30c9\u3010\u521d\u5fc3\u8005\u5411\u3051\u5b8c\u5168\u89e3\u8aac\u3011<\/a>\u300f\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\uff09\n  <\/p>\n<hr \/>\n<h2>1. \u578b\u5b9a\u7fa9\u306e\u4e8c\u91cd\u7ba1\u7406\u3001\u306a\u305c\u82e6\u3057\u3044\uff1f\u201ckeyof typeof\u201d\u30671\u7b87\u6240\u7ba1\u7406\u3078<\/h2>\n<p>\u300c\u4fe1\u983c\u3067\u304d\u308b\u60c5\u5831\u6e90\uff08Single Source of Truth\uff09\u300d\u3092\u4f5c\u308b\u306e\u306f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u306e\u9244\u5247\u3002\u3067\u3082\u3001TypeScript\u73fe\u5834\u3067\u306f\u3053\u3093\u306a\u4e8c\u91cd\u7ba1\u7406\u304c\u6563\u898b\u3055\u308c\u307e\u3059\u3002<\/p>\n<ul>\n<li><strong>const STATUS = &#123; &#8230; &#125;<\/strong>\u3067\u5024\u3092\u5b9a\u7fa9<\/li>\n<li><strong>type Status = &#8216;pending&#8217; | &#8216;active&#8217; | &#8216;deleted&#8217;<\/strong>\u3067\u578b\u3092\u624b\u52d5\u5b9a\u7fa9<\/li>\n<\/ul>\n<p>\n    \u3053\u306e\u904b\u7528\u3060\u3068\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u65b0\u3057\u3044\u30b9\u30c6\u30fc\u30bf\u30b9\u3092\u8ffd\u52a0\u3059\u308b\u305f\u3073\u306b\u578b\u5b9a\u7fa9\u3082\u30bb\u30c3\u30c8\u3067\u66f4\u65b0\u304c\u5fc5\u8981\u3002\u4eba\u9593\u304c\u624b\u52d5\u3067\u3084\u308b\u4ee5\u4e0a\u3001\u4fee\u6b63\u6f0f\u308c\u306f\u5fc5\u305a\u767a\u751f\u3057\u307e\u3059\u3002<br \/>\n    <strong>keyof typeof<\/strong>\u3092\u5c0e\u5165\u3059\u308c\u3070\u3001\u4fee\u6b63\u7b87\u6240\u306f\u300c2\u7b87\u6240\u300d\u2192\u300c1\u7b87\u6240\u300d\u306b\u3002\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u66f4\u65b0\u3059\u308c\u3070\u578b\u3082\u81ea\u52d5\u3067\u8ffd\u5f93\u3002\u3053\u308c\u304c\u4fdd\u5b88\u6027\u306e\u9ad8\u3044\u30b3\u30fc\u30c9\u306e\u9375\u3067\u3059\u3002\n  <\/p>\n<hr \/>\n<h2>2. \u201ctypeof\u201d\u3068\u201ckeyof\u201d\u306e\u6b63\u4f53\u3092\u56f3\u89e3\u3067\u7406\u89e3<\/h2>\n<h3>\u25a0 <strong>typeof<\/strong>\uff1a\u5024\u306e\u69cb\u9020\u3092\u578b\u306b\u5909\u63db<\/h3>\n<ul>\n<li><strong>JavaScript\u306etypeof\uff08\u5b9f\u884c\u6642\uff09<\/strong>\uff1a\u578b\u540d\uff08&#8221;string&#8221;\u306a\u3069\uff09\u3092\u8fd4\u3059<\/li>\n<li><strong>TypeScript\u306etypeof\uff08\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\uff09<\/strong>\uff1a\u5024\u306e\u69cb\u9020\u3092\u578b\u3068\u3057\u3066\u62bd\u51fa<\/li>\n<\/ul>\n<pre><code>const colors = {\r\n  primary: '#007bff',\r\n  secondary: '#6c757d'\r\n};\r\ntype ColorsType = typeof colors;\r\n\/\/ { primary: string; secondary: string; }\r\n<\/code><\/pre>\n<p>  \uff08TypeScript\u3068JavaScript\u306e\u9055\u3044\u306b\u3064\u3044\u3066\u306f\u300e<a href=\"https:\/\/route-zero.com\/recruit\/route\/1279\">TypeScript\u3068\u306f\uff1fJavaScript\u3068\u306e\u9055\u3044\u3092\u521d\u5fc3\u8005\u5411\u3051\u306b\u308f\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac<\/a>\u300f\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\uff09<\/p>\n<blockquote>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1aTypeScript<\/strong><br \/>\n      JavaScript\u306b\u578b\u5b89\u5168\u6027\u3092\u52a0\u3048\u305f\u8a00\u8a9e\u3002\u578b\u5b9a\u7fa9\u3084\u578b\u63a8\u8ad6\u306b\u3088\u3063\u3066\u3001\u30d0\u30b0\u306e\u65e9\u671f\u767a\u898b\u3084\u4fdd\u5b88\u6027\u5411\u4e0a\u3092\u5b9f\u73fe\u3059\u308b\u3002\n    <\/p>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1atypeof<\/strong><br \/>\n      JavaScript\u3067\u306f\u5b9f\u884c\u6642\u306b\u578b\u540d\uff08&#8221;string&#8221;\u306a\u3069\uff09\u3092\u8fd4\u3059\u6f14\u7b97\u5b50\u3002TypeScript\u3067\u306f\u5909\u6570\u3084\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u578b\u60c5\u5831\u3092\u62bd\u51fa\u3059\u308b\u578b\u6f14\u7b97\u5b50\u3068\u3057\u3066\u4f7f\u308f\u308c\u308b\u3002\n    <\/p>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1akeyof<\/strong><br \/>\n      \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u578b\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u540d\uff08\u30ad\u30fc\uff09\u3092Union\u578b\u3068\u3057\u3066\u62bd\u51fa\u3059\u308bTypeScript\u306e\u578b\u6f14\u7b97\u5b50\u3002\n    <\/p>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1aUnion\u578b<\/strong><br \/>\n      \u8907\u6570\u306e\u578b\u3092\u307e\u3068\u3081\u3066\u300c\u3069\u308c\u304b\u4e00\u3064\u300d\u3068\u3057\u3066\u6271\u3046\u578b\u3002\u4f8b\uff1a<strong>&#8216;A&#8217; | &#8216;B&#8217; | &#8216;C&#8217;<\/strong>\u3002\n    <\/p>\n<\/blockquote>\n<h3>\u25a0 <strong>keyof<\/strong>\uff1a\u30ad\u30fc\u3092Union\u578b\u3067\u62bd\u51fa<\/h3>\n<pre><code>type User = { id: number; name: string; };\r\ntype UserKey = keyof User; \/\/ 'id' | 'name'\r\n  <\/code><\/pre>\n<p>\u3053\u306e2\u3064\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u3067\u3001\u5909\u6570\u306e\u5b9f\u4f53\u304b\u3089\u30ad\u30fc\u4e00\u89a7\u3092\u578b\u3068\u3057\u3066\u53d6\u308a\u51fa\u305b\u307e\u3059\u3002<\/p>\n<hr \/>\n<h2>3. \u3010\u5b9f\u8df5\u3011\u201ckeyof typeof\u201d\u3067\u578b\u5b9a\u7fa9\u3092\u81ea\u52d5\u5316\u3059\u308b\u9b54\u6cd5\u306e1\u884c<\/h2>\n<h3>\u25a0 Before\uff1a\u624b\u52d5\u3067\u578b\u3092\u7ba1\u7406<\/h3>\n<pre><code>const USER_STATUS = {\r\n  PENDING: 1,\r\n  ACTIVE: 2,\r\n  DELETED: 9,\r\n} as const;\r\n\r\ntype UserStatusKey = 'PENDING' | 'ACTIVE' | 'DELETED';\r\n<\/code><\/pre>\n<h3>\u25a0 After\uff1a\u81ea\u52d5\u3067\u578b\u3092\u62bd\u51fa<\/h3>\n<pre><code>const USER_STATUS = {\r\n  PENDING: 1,\r\n  ACTIVE: 2,\r\n  DELETED: 9,\r\n} as const;\r\n\r\ntype UserStatusKey = keyof typeof USER_STATUS; \/\/ 'PENDING' | 'ACTIVE' | 'DELETED'\r\n<\/code><\/pre>\n<h3>\u25a0 <strong>as const<\/strong>\u304c\u5fc5\u9808\u306a\u7406\u7531<\/h3>\n<pre><code>const WITHOUT_AS_CONST = { A: 1 };\r\ntype BadKey = keyof typeof WITHOUT_AS_CONST; \/\/ string\r\n\r\nconst WITH_AS_CONST = { A: 1 } as const;\r\ntype GoodKey = keyof typeof WITH_AS_CONST; \/\/ 'A'\r\n<\/code><\/pre>\n<p>  \u5b9f\u52d9\u3067\u306f<strong>as const<\/strong>\u3068\u30bb\u30c3\u30c8\u3067\u904b\u7528\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<blockquote>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1aas const<\/strong><br \/>\n      TypeScript\u3067\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3084\u914d\u5217\u3092\u300c\u30ea\u30c6\u30e9\u30eb\u578b\u300d\u3068\u3057\u3066\u56fa\u5b9a\u3059\u308b\u305f\u3081\u306e\u69cb\u6587\u3002\u578b\u63a8\u8ad6\u304c\u5177\u4f53\u7684\u306a\u5024\uff08\u30ea\u30c6\u30e9\u30eb\uff09\u306b\u306a\u308b\u305f\u3081\u3001\u578b\u62bd\u51fa\u304c\u6b63\u78ba\u306b\u306a\u308b\u3002\n    <\/p>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u30ea\u30c6\u30e9\u30eb\u578b<\/strong><br \/>\n      \u5177\u4f53\u7684\u306a\u5024\u305d\u306e\u3082\u306e\u3092\u578b\u3068\u3057\u3066\u6271\u3046TypeScript\u306e\u578b\u3002\u4f8b\uff1a<strong>&#8216;A&#8217;<\/strong>\u3084<strong>1<\/strong>\u306a\u3069\u3002\n    <\/p>\n<\/blockquote>\n<hr \/>\n<h2>4. 2026\u5e74\u306e\u65b0\u5b9a\u756a\uff1a<strong>satisfies<\/strong>\u6f14\u7b97\u5b50\u3068\u306e\u4f7f\u3044\u5206\u3051<\/h2>\n<h3>\u25a0 <strong>as const<\/strong>\u3060\u3051\u3067\u306f\u4e0d\u5341\u5206\uff1f<strong>satisfies<\/strong>\u3067\u578b\u5236\u7d04<\/h3>\n<pre><code>type Colors = Record<string, string>;\r\n\r\nconst THEME = {\r\n  primary: '#007',\r\n  secondary: 123, \/\/ \u30a8\u30e9\u30fc\u306b\u3057\u305f\u3044\u304c\u3001as const\u3060\u3051\u3067\u306f\u901a\u308b\r\n} as const;\r\n<\/code><\/pre>\n<pre><code>const THEME = {\r\n  primary: '#007',\r\n  secondary: '#6c7',\r\n} as const satisfies Record<string, string>;\r\n\r\ntype ThemeKey = keyof typeof THEME; \/\/ 'primary' | 'secondary'\r\n<\/code><\/pre>\n<blockquote>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1asatisfies<\/strong><br \/>\n      TypeScript 4.9\u4ee5\u964d\u3067\u5c0e\u5165\u3055\u308c\u305f\u578b\u6f14\u7b97\u5b50\u3002\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u304c\u7279\u5b9a\u306e\u578b\u3092\u6e80\u305f\u3057\u3066\u3044\u308b\u304b\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3064\u3064\u3001\u578b\u63a8\u8ad6\u3092\u5e83\u3052\u306a\u3044\uff08\u30ea\u30c6\u30e9\u30eb\u578b\u3092\u7dad\u6301\uff09\u3053\u3068\u304c\u3067\u304d\u308b\u3002\n    <\/p>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1aRecord\u578b<\/strong><br \/>\n      TypeScript\u306e\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u578b\u3002<strong>Record&lt;K, T&gt;<\/strong>\u306f\u300c\u30ad\u30fcK\u3068\u5024T\u306e\u30da\u30a2\u300d\u3092\u8868\u73fe\u3059\u308b\u3002\n    <\/p>\n<\/blockquote>\n<h3>\u25a0 \u30ad\u30fc\u3060\u3051\u3058\u3083\u306a\u3044\uff01\u5024\u306e\u578b\u3082\u81ea\u52d5\u62bd\u51fa<\/h3>\n<pre><code>const APP_CONFIG = {\r\n  API_URL: 'https:\/\/api.example.com',\r\n  RETRY_COUNT: 3,\r\n} as const;\r\n\r\ntype AppConfigValues = typeof APP_CONFIG[keyof typeof APP_CONFIG];\r\n\/\/ 'https:\/\/api.example.com' | 3\r\n<\/code><\/pre>\n<hr \/>\n<h2>5. \u5b9f\u52d9\u3067\u4f7f\u3048\u308b\u9006\u5f15\u304d\u30b9\u30cb\u30da\u30c3\u30c8\u96c6<\/h2>\n<h3>\u25a0 React\u306eProps\u3067\u30d0\u30ea\u30a2\u30f3\u30c8\u5b9a\u7fa9<\/h3>\n<pre><code>const BUTTON_VARIANTS = {\r\n  primary: 'bg-blue-500 text-white',\r\n  secondary: 'bg-gray-500 text-white',\r\n  danger: 'bg-red-500 text-white',\r\n} as const;\r\n\r\ntype ButtonProps = {\r\n  variant: keyof typeof BUTTON_VARIANTS;\r\n  label: string;\r\n};\r\n\r\nconst Button = ({ variant, label }: ButtonProps) => (\r\n  <button className={BUTTON_VARIANTS[variant]}>{label}<\/button>\r\n);\r\n<\/code><\/pre>\n<p>  \uff08TypeScript\u306e\u30d5\u30a9\u30fc\u30e0\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306b\u3064\u3044\u3066\u306f\u300e<a href=\"https:\/\/route-zero.com\/recruit\/route\/1683\">TypeScript\u30d5\u30a9\u30fc\u30e0\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u5fb9\u5e95\u6bd4\u8f03\uff5cZod\u30fbYup\u30fbReact Hook Form\u306e\u9055\u3044\u3068\u9078\u3073\u65b9<\/a>\u300f\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\uff09<\/p>\n<h3>\u25a0 API\u30ec\u30b9\u30dd\u30f3\u30b9\u306e\u30a8\u30e9\u30fc\u30b3\u30fc\u30c9\u7ba1\u7406<\/h3>\n<pre><code>const ERROR_MESSAGES = {\r\n  NOT_FOUND: '\u30c7\u30fc\u30bf\u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002',\r\n  UNAUTHORIZED: '\u8a8d\u8a3c\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002',\r\n  SERVER_ERROR: '\u30b5\u30fc\u30d0\u30fc\u30a8\u30e9\u30fc\u304c\u767a\u751f\u3057\u307e\u3057\u305f\u3002',\r\n} as const;\r\n\r\nfunction handleError(strong: keyof typeof ERROR_MESSAGES) {\r\n  const message = ERROR_MESSAGES[strong];\r\n  console.error(message);\r\n}\r\n<\/code><\/pre>\n<hr \/>\n<h2>6. FAQ\uff5c\u3088\u304f\u3042\u308b\u7591\u554f\u306b\u56de\u7b54<\/h2>\n<ul>\n<li>\n      <strong>Q\uff1akeyof typeof \u3092\u4f7f\u3046\u3068\u578b\u304c string \u306b\u306a\u308b\u306e\u306f\u306a\u305c\uff1f<\/strong><br \/>A\uff1a<strong>as const<\/strong>\u304c\u4ed8\u4e0e\u3055\u308c\u3066\u3044\u306a\u3044\u3068\u3001TypeScript\u306f\u30d7\u30ed\u30d1\u30c6\u30a3\u3092string\u578b\u3068\u3057\u3066\u63a8\u8ad6\u3057\u307e\u3059\u3002\u5fc5\u305a<strong\n        >as const<\/strong\n      >\u3092\u6dfb\u3048\u3066\u304f\u3060\u3055\u3044\u3002\n    <\/li>\n<li>\n      <strong>Q\uff1a\u30cd\u30b9\u30c8\u3057\u305f\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u30ad\u30fc\u306f\u62bd\u51fa\u3067\u304d\u308b\uff1f<\/strong><br \/>A\uff1a\u57fa\u672c\u306f\u7b2c1\u968e\u5c64\u306e\u307f\u3002\u30cd\u30b9\u30c8\u3057\u305f\u30ad\u30fc\u3092\u53d6\u5f97\u3059\u308b\u306b\u306f<strong>keyof typeof obj.nestedProperty<\/strong>\u306e\u3088\u3046\u306b\u30d1\u30b9\u6307\u5b9a\u304c\u5fc5\u8981\u3067\u3059\u3002\n    <\/li>\n<li>\n      <strong>Q\uff1aEnum\u3068\u3069\u3061\u3089\u304c\u826f\u3044\uff1f<\/strong><br \/>A\uff1aTree-shaking\u3084\u67d4\u8edf\u6027\u306e\u89b3\u70b9\u304b\u3089\u3001<strong>as const<\/strong>\uff0b<strong>keyof typeof<\/strong\n      >\u304c\u4e3b\u6d41\u3002React\u306a\u3069\u30e2\u30c0\u30f3\u958b\u767a\u3067\u306f\u3053\u306e\u7d44\u307f\u5408\u308f\u305b\u304c\u63a8\u5968\u3055\u308c\u3066\u3044\u307e\u3059\u3002\n    <\/li>\n<li><strong>Q\uff1asatisfies\u306f\u3044\u3064\u4f7f\u3046\uff1f<\/strong><br \/>A\uff1a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u69cb\u9020\u306b\u5236\u7d04\u3092\u8a2d\u3051\u305f\u3044\u5834\u5408\u306b\u4f7f\u3044\u307e\u3059\u3002\u578b\u30c1\u30a7\u30c3\u30af\uff0b\u5177\u4f53\u7684\u306a\u578b\u63a8\u8ad6\u3092\u4e21\u7acb\u3067\u304d\u307e\u3059\u3002<\/li>\n<li><strong>Q\uff1a\u5b9f\u884c\u6642\u306b\u30ad\u30fc\u3092\u53d6\u5f97\u3067\u304d\u308b\uff1f<\/strong><br \/>A\uff1a<strong>keyof typeof<\/strong>\u306f\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306e\u578b\u60c5\u5831\u3002\u5b9f\u884c\u6642\u306f<strong>Object.keys()<\/strong>\u3092\u4f7f\u3044\u307e\u3057\u3087\u3046\u3002<\/li>\n<\/ul>\n<hr \/>\n<h2>\u307e\u3068\u3081\u3068\u6b21\u306e\u4e00\u624b<\/h2>\n<p><strong>keyof typeof<\/strong>\u306f\u578b\u5b9a\u7fa9\u306e\u81ea\u52d5\u5316\u3092\u5b9f\u73fe\u3057\u3001\u79c1\u305f\u3061\u3092\u4fdd\u5b88\u6027\u306e\u4f4e\u3044\u4f5c\u696d\u304b\u3089\u89e3\u653e\u3057\u3066\u304f\u308c\u308b\u5fc5\u9808\u30c6\u30af\u30cb\u30c3\u30af\u3067\u3059\u3002<\/p>\n<ul>\n<li>\u4e8c\u91cd\u7ba1\u7406\u306e\u89e3\u6d88\uff1a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u30bd\u30fc\u30b9\u306b\u578b\u3092\u4f5c\u308b\u3053\u3068\u3067\u4fee\u6b63\u6f0f\u308c\u3092\u9632\u3050<\/li>\n<li><strong>as const<\/strong>\u306e\u91cd\u8981\u6027\uff1a\u30ea\u30c6\u30e9\u30eb\u578b\u3068\u3057\u3066\u62bd\u51fa\u3059\u308b\u305f\u3081\u306b\u6b20\u304b\u305b\u306a\u3044<\/li>\n<li>2026\u5e74\u306e\u30d9\u30b9\u30c8\u30d7\u30e9\u30af\u30c6\u30a3\u30b9\uff1a<strong>satisfies<\/strong>\u3067\u5236\u7d04\u3068\u63a8\u8ad6\u3092\u4e21\u7acb<\/li>\n<\/ul>\n<p>\u305c\u3072\u30b3\u30fc\u30c9\u3092\u30b3\u30d4\u30da\u3057\u3066\u3001\u307e\u305a\u306f\u52d5\u304b\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<hr \/>\n<\/div>\n","protected":false},"featured_media":1933,"template":"","_links":{"self":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/route\/1910"}],"collection":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/route"}],"about":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/types\/route"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/media\/1933"}],"wp:attachment":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/media?parent=1910"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}