{"id":1798,"date":"2025-08-18T00:12:07","date_gmt":"2025-08-17T15:12:07","guid":{"rendered":"https:\/\/route-zero.com\/recruit\/?post_type=route&#038;p=1798"},"modified":"2025-12-18T00:12:18","modified_gmt":"2025-12-17T15:12:18","slug":"typescript-promise%e5%9e%8b%e5%ae%9a%e7%be%a9%e5%ae%8c%e5%85%a8%e8%a7%a3%e8%aa%ac%ef%bd%9cany%e6%92%b2%e6%bb%85%e3%81%a8%e4%bd%bf%e3%81%84%e5%88%86%e3%81%91","status":"publish","type":"route","link":"https:\/\/route-zero.com\/recruit\/route\/1798\/","title":{"rendered":"TypeScript Promise\u578b\u5b9a\u7fa9\u5b8c\u5168\u89e3\u8aac\uff5cany\u64b2\u6ec5\u3068\u4f7f\u3044\u5206\u3051"},"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    \u300casync\/await\u306f\u666e\u6bb5\u304b\u3089\u4f7f\u3063\u3066\u308b\u3051\u3069\u3001Promise\u306e\u578b\u5b9a\u7fa9\u304c\u306a\u3093\u3068\u306a\u304f\u201cany\u201d\u983c\u307f\u2026\u3002<br \/>\n    \u30a8\u30e9\u30fc\u30cf\u30f3\u30c9\u30ea\u30f3\u30b0\u3082\u81ea\u5df1\u6d41\u3067\u3001\u5f8c\u8f29\u30ec\u30d3\u30e5\u30fc\u306e\u305f\u3073\u306b\u30bd\u30ef\u30bd\u30ef\u2026\u3002\u300d<br \/>\n    \u3053\u3093\u306a\u201c\u958b\u767a\u8005\u3042\u308b\u3042\u308b\u201d\u3001\u8eab\u306b\u899a\u3048\u3042\u308a\u307e\u305b\u3093\u304b\uff1f<br \/>\n    \u79c1\u305f\u3061\u3082\u73fe\u5834\u3067\u540c\u3058\u3088\u3046\u306b\u30e2\u30e4\u30e2\u30e4\u3057\u3066\u304d\u307e\u3057\u305f\u3002<br \/>\n    \u672c\u8a18\u4e8b\u3067\u306f\u3001\u305d\u306e\u60a9\u307f\u3092\u201c\u4e00\u7dd2\u306b\u201d\u6574\u7406\u3057\u3001<strong>\u81ea\u4fe1\u3092\u6301\u3063\u3066\u4f7f\u3044\u3053\u306a\u305b\u308bPromise\u306e\u578b\u30fb\u4f7f\u3044\u5206\u3051\u30fb\u30a2\u30f3\u30c1\u30d1\u30bf\u30fc\u30f3\u56de\u907f<\/strong>\u307e\u3067\u3001\u56f3\u3068\u30b3\u30fc\u30c9\u4f8b\u3067\u4f34\u8d70\u3057\u307e\u3059\u3002\n  <\/p>\n<hr \/>\n<h2>1. Promise\u3063\u3066\u4f55\uff1f\u2014 async\/await\u306e\u201c\u88cf\u5074\u201d\u3067\u52d5\u304f\u975e\u540c\u671f\u51e6\u7406\u306e\u6b63\u4f53<\/h2>\n<h3>\u25a0 \u7528\u8a9e\u3068\u4ed5\u7d44\u307f\uff1a\u300cPromise\u300d\u3068\u306f\uff1f<\/h3>\n<p>\n    \u300casync\/await\u4f7f\u3048\u3066\u308b\u306e\u306b\u3001\u306a\u305cPromise\u3092\u610f\u8b58\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u306e\uff1f\u300d\u305d\u3093\u306a\u7591\u554f\u3001\u3088\u304f\u805e\u304d\u307e\u3059\u3002<br \/>\n    <strong>Promise<\/strong>\u3068\u306f\u3001\u3056\u3063\u304f\u308a\u8a00\u3048\u3070<strong>\u300c\u975e\u540c\u671f\u51e6\u7406\u306e\u7d50\u679c\u3092\u6301\u3064\u201c\u7bb1\u201d\u300d<\/strong>\u3002<br \/>\n    \u4f8b\u3048\u3070API\u30c7\u30fc\u30bf\u306e\u53d6\u5f97\u3084\u30d5\u30a1\u30a4\u30eb\u64cd\u4f5c\u2015\u2015\u201c\u4eca\u306f\u7d50\u679c\u304c\u306a\u3044\u3051\u3069\u3001\u672a\u6765\u306b\u5024\u304c\u5165\u308b\u201d\u305d\u3093\u306a\u7bb1\u3067\u3059\u3002<br \/>\n    <br \/>\uff08\u975e\u540c\u671f\u51e6\u7406\u306e\u57fa\u790e\u3084JavaScript\u306e\u5b9f\u4f8b\u306b\u3064\u3044\u3066\u306f\u300e<a href=\"https:\/\/route-zero.com\/recruit\/route\/1212\/\">\u975e\u540c\u671f\u51e6\u7406\u3068\u306f\uff1fJavaScript\u3068Java\u306e\u5b9f\u4f8b\u3067\u308f\u304b\u308b\u4f7f\u3044\u65b9\u30fb\u843d\u3068\u3057\u7a74\u30fb\u89e3\u6c7a\u6cd5<\/a\n    >\u300f\u3092\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\uff09\n  <\/p>\n<blockquote>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1aPromise<\/strong><br \/>\n      JavaScript\u3067\u975e\u540c\u671f\u51e6\u7406\u306e\u300c\u6210\u529f\u30fb\u5931\u6557\u30fb\u9032\u884c\u4e2d\u300d\u306e\u72b6\u614b\u3084\u7d50\u679c\u3092\u7ba1\u7406\u3059\u308b\u305f\u3081\u306e\u4ed5\u7d44\u307f\u3002API\u901a\u4fe1\u3084\u30d5\u30a1\u30a4\u30eb\u8aad\u307f\u8fbc\u307f\u306a\u3069\u3001\u3059\u3050\u306b\u7d50\u679c\u304c\u51fa\u306a\u3044\u51e6\u7406\u306e\u300c\u5b8c\u4e86\u300d\u3084\u300c\u5931\u6557\u300d\u3092\u5f8c\u304b\u3089\u53d7\u3051\u53d6\u308c\u308b\u201c\u7bb1\u201d\u306e\u3088\u3046\u306a\u5b58\u5728\u3002\n    <\/p>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u975e\u540c\u671f\u51e6\u7406<\/strong><br \/>\n      \u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u5b9f\u884c\u4e2d\u306b\u3001\u4ed6\u306e\u51e6\u7406\u3092\u5f85\u305f\u305a\u306b\u9032\u3081\u308b\u4ed5\u7d44\u307f\u3002\u4f8b\u3048\u3070\u300c\u30c7\u30fc\u30bf\u53d6\u5f97\u304c\u7d42\u308f\u308b\u307e\u3067\u4ed6\u306e\u4f5c\u696d\u3082\u540c\u6642\u9032\u884c\u3067\u304d\u308b\u300d\u30a4\u30e1\u30fc\u30b8\u3002\n    <\/p>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1aAPI<\/strong><br \/>\n      \u4ed6\u306e\u30b5\u30fc\u30d3\u30b9\u3084\u30b7\u30b9\u30c6\u30e0\u3068\u30c7\u30fc\u30bf\u3092\u3084\u308a\u53d6\u308a\u3059\u308b\u305f\u3081\u306e\u300c\u7a93\u53e3\u300d\u3084\u300c\u53d6\u308a\u6c7a\u3081\u300d\u3002\n    <\/p>\n<\/blockquote>\n<ul>\n<li><strong>pending\uff08\u5f85\u6a5f\u4e2d\uff09<\/strong>\u2026\u975e\u540c\u671f\u51e6\u7406\u306e\u6700\u4e2d<\/li>\n<li><strong>fulfilled\uff08\u6210\u529f\uff09<\/strong>\u2026\u7121\u4e8b\u306b\u5024\u304c\u5165\u3063\u305f\u72b6\u614b<\/li>\n<li><strong>rejected\uff08\u5931\u6557\uff09<\/strong>\u2026\u30a8\u30e9\u30fc\uff08\u7406\u7531\uff09\u304c\u5165\u3063\u305f\u72b6\u614b<\/li>\n<\/ul>\n<p>\n    \u4e00\u5ea6\u300cfulfilled\u300d\u304b\u300crejected\u300d\u306b\u306a\u308c\u3070\u7d50\u679c\u306f<strong>\u4e0d\u5909<\/strong>\u3067\u3059\u3002<\/p>\n<p>    \u3053\u3053\u3067\u30dd\u30a4\u30f3\u30c8\u3002<br \/>\n    <strong>async\/await\u306fPromise\u306e\u201c\u7cd6\u8863\u69cb\u6587\u201d<\/strong>\u3001\u3064\u307e\u308a\u672c\u8cea\u306f<strong>Promise<\/strong>\u3002\u76f4\u611f\u7684\u306b\u66f8\u3051\u308b\u3060\u3051\u3067\u3001\u88cf\u5074\u306f\u5168\u3066Promise\u304c\u5236\u5fa1\u3057\u3066\u3044\u307e\u3059\u3002\n  <\/p>\n<blockquote>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1aasync\/await<\/strong><br \/>\n      JavaScript\u3067Promise\u3092\u300c\u76f4\u611f\u7684\u30fb\u7c21\u5358\u300d\u306b\u66f8\u304f\u305f\u3081\u306e\u6587\u6cd5\u3002async\u3092\u4ed8\u3051\u305f\u95a2\u6570\u306f\u5fc5\u305aPromise\u3092\u8fd4\u3057\u3001await\u3067\u300cPromise\u306e\u5b8c\u4e86\u3092\u5f85\u3064\u300d\u3053\u3068\u304c\u3067\u304d\u308b\u3002\n    <\/p>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u7cd6\u8863\u69cb\u6587\uff08\u30b7\u30f3\u30bf\u30c3\u30af\u30b9\u30b7\u30e5\u30ac\u30fc\uff09<\/strong><br \/>\n      \u672c\u8cea\u7684\u306a\u52d5\u4f5c\u306f\u540c\u3058\u3060\u304c\u3001\u3088\u308a\u5206\u304b\u308a\u3084\u3059\u304f\u30fb\u66f8\u304d\u3084\u3059\u304f\u3059\u308b\u305f\u3081\u306e\u6587\u6cd5\u4e0a\u306e\u5de5\u592b\u3002\n    <\/p>\n<\/blockquote>\n<pre><code>\/\/ async\u95a2\u6570\u306f\u5fc5\u305aPromise\u3092\u8fd4\u3057\u307e\u3059\r\nasync function fetchData(): Promise&lt;string&gt; {\r\n  return \"\u30c7\u30fc\u30bf\";\r\n}\r\n\/\/ \u4e0a\u306f\u5185\u90e8\u7684\u306bPromise.resolve(\"\u30c7\u30fc\u30bf\")\u3068\u540c\u3058\u610f\u5473\r\n<\/code><\/pre>\n<p>\u8907\u96d1\u306a\u975e\u540c\u671f\u5236\u5fa1\u3084\u30a8\u30e9\u30fc\u51e6\u7406\u3092\u3061\u3083\u3093\u3068\u3057\u305f\u3044\u306a\u3089\u3001Promise\u306e\u6b63\u4f53\u304b\u3089\u7406\u89e3\u3057\u3066\u304a\u304f\u306e\u304c\u8fd1\u9053\u3067\u3059\u3002<\/p>\n<p>\n    \uff08async\/await\u306e\u30d0\u30b0\u3084\u4f7f\u3044\u5206\u3051\u306b\u3064\u3044\u3066\u306f\u300e<a href=\"https:\/\/route-zero.com\/recruit\/route\/1389\/\">async\u95a2\u6570\u3067then\u304c\u4f7f\u3048\u306a\u3044\uff1f\u539f\u56e0\u3068\u5bfe\u7b56\u3092\u5b8c\u5168\u89e3\u8aac<\/a>\u300f\u3084\u300e<a href=\"https:\/\/route-zero.com\/recruit\/route\/1765\/\" target=\"_blank\" rel=\"noopener\">JavaScript this\u306e\u9055\u3044\u30fb\u30d0\u30b0\u4e8b\u4f8b7\u9078\uff5c\u30a2\u30ed\u30fc\u95a2\u6570\u3084bind\u306e\u8ff7\u308f\u306a\u3044\u4f7f\u3044\u5206\u3051<\/a\n    >\u300f\u3082\u53c2\u8003\u306b\u306a\u308a\u307e\u3059\uff09\n  <\/p>\n<hr \/>\n<h2>2. any\u64b2\u6ec5\uff01Promise\u306e\u578b\u5b9a\u7fa93\u30d1\u30bf\u30fc\u30f3<\/h2>\n<h3>\u25a0 \u6b63\u3057\u3044\u578b\u5b9a\u7fa9\u3067\u300c\u578b\u5b89\u5168\u300d\u3068\u4fdd\u5b88\u6027UP<\/h3>\n<p>\n    \u300c\u3064\u3044Promise\u306e\u578b\u5b9a\u7fa9\u304c<code>any<\/code>\u306b\u2026\u3002\u578b\u5b89\u5168\u3001\u3069\u3053\u3044\u3063\u305f\uff1f\u300d<br \/>\n    \u3053\u306e\u60a9\u307f\u3001\u79c1\u305f\u3061\u3082\u901a\u308a\u307e\u3057\u305f\u3002<br \/>\n    TypeScript\u3067<strong>Promise<\/strong>\u3092\u6271\u3046\u969b\u306f<strong>\u300c\u6b63\u3057\u3044\u578b\u5b9a\u7fa9\u300d<\/strong>\u304c\u6700\u91cd\u8981\u3002<code>any<\/code>\u3092\u5b89\u6613\u306b\u4f7f\u3048\u3070\u578b\u5b89\u5168\u306f\u5d29\u58ca\u3057\u307e\u3059\u3002<br \/>\n    <br \/>\uff08TypeScript\u306e\u578b\u3084\u958b\u767a\u74b0\u5883\u306e\u59cb\u3081\u65b9\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\u3084\u300e<a\n      href=\"https:\/\/route-zero.com\/recruit\/route\/1291\"\n      >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\n    >\u300f\u3082\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\uff09\n  <\/p>\n<blockquote>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u578b\u5b89\u5168<\/strong><br \/>\n      \u30d7\u30ed\u30b0\u30e9\u30e0\u4e2d\u3067\u300c\u5024\u306e\u7a2e\u985e\uff08\u578b\uff09\u300d\u304c\u6b63\u3057\u304f\u5b88\u3089\u308c\u3066\u3044\u308b\u72b6\u614b\u3002\u578b\u304c\u5408\u308f\u306a\u3044\u30df\u30b9\u3092\u4e8b\u524d\u306b\u9632\u3052\u308b\u3002\n    <\/p>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1aany\u578b<\/strong><br \/>\n      TypeScript\u3067\u300c\u3069\u3093\u306a\u578b\u3067\u3082OK\u300d\u3068\u3057\u3066\u6271\u3046\u5371\u967a\u306a\u578b\u3002\u578b\u5b89\u5168\u304c\u5931\u308f\u308c\u308b\u539f\u56e0\u3002\n    <\/p>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1aTypeScript<\/strong><br \/>\n      JavaScript\u306b\u300c\u578b\u300d\u306e\u4ed5\u7d44\u307f\u3092\u52a0\u3048\u305f\u8a00\u8a9e\u3002\u5927\u898f\u6a21\u958b\u767a\u3084\u4fdd\u5b88\u6027\u5411\u4e0a\u306b\u5f79\u7acb\u3064\u3002\n    <\/p>\n<\/blockquote>\n<h3>\u25a0 \u57fa\u672c\uff1aPromise&lt;T&gt;\u3067\u578b\u3092\u660e\u793a\u3059\u308b<\/h3>\n<p>\n    \u6210\u529f\u6642\u306b\u8fd4\u3059\u5024\u306e\u578b\u306f\u3001<code>Promise&lt;T&gt;<\/code>\u3067\u6307\u5b9a\u3057\u307e\u3059\u3002<br \/>\n    T\u306b\u306f<code>string<\/code>\u3084<code>number<\/code>\u3001\u81ea\u4f5c\u306e<strong>interface<\/strong>\u306a\u3069OK\u3002\n  <\/p>\n<blockquote>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1ainterface<\/strong><br \/>\n      TypeScript\u3067\u300c\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u5f62\uff08\u30d7\u30ed\u30d1\u30c6\u30a3\u3084\u578b\uff09\u300d\u3092\u5b9a\u7fa9\u3059\u308b\u4ed5\u7d44\u307f\u3002\u578b\u30c1\u30a7\u30c3\u30af\u3084\u81ea\u52d5\u88dc\u5b8c\u306b\u5f79\u7acb\u3064\u3002\n    <\/p>\n<\/blockquote>\n<pre><code>interface User {\r\n  id: number;\r\n  name: string;\r\n}\r\n\r\nfunction fetchUser(userId: string): Promise&lt;User&gt; {\r\n  return new Promise((resolve, reject) =&gt; {\r\n    const user: User = { id: 1, name: \"Taro Yamada\" };\r\n    if (user) resolve(user);\r\n    else reject(new Error(\"User not found.\"));\r\n  });\r\n}\r\n\r\nfetchUser(\"1\").then(user =&gt; {\r\n  console.log(user.name); \/\/ user\u306fUser\u578b\u3067\u63a8\u8ad6\r\n});\r\n<\/code><\/pre>\n<h3>\u25a0 async\u95a2\u6570\u306f\u8fd4\u308a\u5024\u306e\u578b\u63a8\u8ad6\u306b\u304a\u4efb\u305b<\/h3>\n<pre><code>interface Product {\r\n  id: string;\r\n  price: number;\r\n}\r\n\r\n\/\/ \u578b\u6ce8\u91c8\u306a\u3057\u3067\u3082OK\r\nasync function fetchProduct(productId: string) {\r\n  const response = await fetch(`\/api\/products\/${productId}`);\r\n  if (!response.ok) throw new Error(\"Network response was not ok\");\r\n  return await response.json() as Product;\r\n}\r\n\r\n\/\/ \u578b\u3092\u660e\u793a\u3057\u3066\u5805\u7262\u306b\u3059\u308b\u5834\u5408\r\nasync function fetchProductExplicit(productId: string): Promise&lt;Product&gt; {\r\n  return { id: productId, price: 1000 };\r\n}\r\n<\/code><\/pre>\n<h3>\u25a0 catch\u306e\u30a8\u30e9\u30fc\u578b\u306funknown\uff0b\u578b\u30ac\u30fc\u30c9\u304c\u9244\u5247<\/h3>\n<pre><code>async function execute() {\r\n  try {\r\n    throw \"\u6587\u5b57\u5217\u30a8\u30e9\u30fc\";\r\n  } catch (error: unknown) {\r\n    console.error(getErrorMessage(error));\r\n  }\r\n}\r\n\r\nfunction getErrorMessage(error: unknown): string {\r\n  if (error instanceof Error) return error.message;\r\n  if (typeof error === 'string') return error;\r\n  return 'An unknown error occurred.';\r\n}\r\n<\/code><\/pre>\n<p><strong>unknown\u578b\uff0b\u578b\u30ac\u30fc\u30c9<\/strong>\u3067\u4e88\u671f\u305b\u306c\u30a8\u30e9\u30fc\u306b\u3082\u5b89\u5fc3\u5bfe\u5fdc\uff01<\/p>\n<p>\n    \uff08JavaScript\u306e\u3088\u304f\u3042\u308b\u30a8\u30e9\u30fc\u3084\u539f\u56e0\u30fb\u5bfe\u7b56\u306f\u300e<a href=\"https:\/\/route-zero.com\/recruit\/route\/1109\/\"\n      >JavaScript\u3067\u3088\u304f\u767a\u751f\u3059\u308b\u30a8\u30e9\u30fc\u300cReferenceError\u300d\u300cSyntaxError\u300d\u306a\u3069\u306e\u539f\u56e0\u3068\u5bfe\u7b56\u3092\u5177\u4f53\u4f8b\u4ed8\u304d\u3067\u89e3\u8aac<\/a\n    >\u300f\u3082\u53c2\u8003\u306b\u306a\u308a\u307e\u3059\uff09\n  <\/p>\n<blockquote>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1aunknown\u578b<\/strong><br \/>\n      TypeScript\u3067\u300c\u3069\u3093\u306a\u578b\u304b\u5206\u304b\u3089\u306a\u3044\u300d\u3053\u3068\u3092\u660e\u793a\u3059\u308b\u578b\u3002any\u3088\u308a\u5b89\u5168\u3067\u3001\u4f7f\u3046\u3068\u304d\u306f\u578b\u30c1\u30a7\u30c3\u30af\uff08\u578b\u30ac\u30fc\u30c9\uff09\u304c\u5fc5\u9808\u3002\n    <\/p>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u578b\u30ac\u30fc\u30c9<\/strong><br \/>\n      \u5024\u306e\u578b\u3092if\u6587\u306a\u3069\u3067\u5224\u5b9a\u3057\u3001\u5b89\u5168\u306b\u4f7f\u3046\u305f\u3081\u306e\u30c6\u30af\u30cb\u30c3\u30af\u3002\n    <\/p>\n<\/blockquote>\n<hr \/>\n<h2>3. \u9759\u7684\u30e1\u30bd\u30c3\u30c9\u306e\u4f7f\u3044\u5206\u3051\u30d5\u30ed\u30fc\u30c1\u30e3\u30fc\u30c8\u2014all, allSettled, race, any\u306e\u9055\u3044\u306f\uff1f<\/h2>\n<h3>\u25a0 \u8907\u6570\u306e\u975e\u540c\u671f\u51e6\u7406\u3001\u3069\u3046\u307e\u3068\u3081\u308b\uff1f<\/h3>\n<p><strong>Promise<\/strong>\u306b\u306f\u7528\u9014\u3054\u3068\u306b\u4f7f\u3044\u5206\u3051\u308b\u3079\u304d\u9759\u7684\u30e1\u30bd\u30c3\u30c9\u304c\u63c3\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<blockquote>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u9759\u7684\u30e1\u30bd\u30c3\u30c9<\/strong><br \/>\n      \u30af\u30e9\u30b9\u3084\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u5c5e\u3059\u308b\u300c\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u305b\u305a\u306b\u4f7f\u3048\u308b\u300d\u95a2\u6570\u3002Promise.all\u306a\u3069\u306f\u76f4\u63a5Promise\u304b\u3089\u547c\u3073\u51fa\u305b\u308b\u3002\n    <\/p>\n<\/blockquote>\n<h3>1. \u5168\u90e8\u201c\u6210\u529f\u201d\u524d\u63d0\u306a\u3089Promise.all<\/h3>\n<p>\n    \u300c\u5168\u90e8\u306eAPI\u304c\u63c3\u308f\u306a\u3044\u3068\u30c0\u30e1\uff01\u300d\u306a\u3089<code>Promise.all<\/code>\u3067\u3059\u3002<br \/>\n    \u4e00\u3064\u3067\u3082\u5931\u6557\uff08rejected\uff09\u3059\u308b\u3068\u3001<strong>\u5168\u4f53\u304c\u5373\u5931\u6557<\/strong>\u306b\u306a\u308b\u306e\u3067\u6ce8\u610f\u3002<br \/>\n    <br \/>\uff08API\u306e\u57fa\u790e\u3084\u73fe\u5834\u3067\u306e\u6d3b\u7528\u6cd5\u306f\u300e<a href=\"https:\/\/route-zero.com\/recruit\/route\/1759\/\">API\u3068\u306f\uff1fSES\u73fe\u5834\u3067\u5f79\u7acb\u3064\u57fa\u790e\u301cPostman\u6d3b\u7528\u307e\u3067\u5b8c\u5168\u30ac\u30a4\u30c9<\/a>\u300f\u3082\u3054\u53c2\u7167\u304f\u3060\u3055\u3044\uff09\n  <\/p>\n<blockquote>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1aPromise.all<\/strong><br \/>\n      \u8907\u6570\u306ePromise\uff08\u975e\u540c\u671f\u51e6\u7406\uff09\u3092\u307e\u3068\u3081\u3066\u5b9f\u884c\u3057\u3001\u5168\u90e8\u6210\u529f\u3057\u305f\u3089\u7d50\u679c\u3092\u914d\u5217\u3067\u8fd4\u3059\u30021\u3064\u3067\u3082\u5931\u6557\u3059\u308b\u3068\u5168\u4f53\u304c\u5931\u6557\u306b\u306a\u308b\u3002\n    <\/p>\n<\/blockquote>\n<pre><code>async function getDashboardData() {\r\n  try {\r\n    const [user, posts, settings] = await Promise.all([\r\n      fetch('\/api\/user'),\r\n      fetch('\/api\/posts'),\r\n      fetch('\/api\/settings')\r\n    ]);\r\n    console.log('All data loaded!');\r\n  } catch (error) {\r\n    console.error(\"Failed to load one of the resources:\", error);\r\n  }\r\n}\r\n<\/code><\/pre>\n<h3>2. \u4e00\u90e8\u5931\u6557OK\u30fb\u5168\u90e8\u306e\u7d50\u679c\u304c\u6b32\u3057\u3044\u306a\u3089allSettled<\/h3>\n<blockquote>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1aPromise.allSettled<\/strong><br \/>\n      \u8907\u6570\u306ePromise\u3092\u307e\u3068\u3081\u3066\u5b9f\u884c\u3057\u3001\u5168\u90e8\u306e\u300c\u6210\u529f\u30fb\u5931\u6557\u300d\u7d50\u679c\u3092\u914d\u5217\u3067\u8fd4\u3059\u3002\u5931\u6557\u304c\u3042\u3063\u3066\u3082\u5168\u4f53\u306f\u6b62\u307e\u3089\u306a\u3044\u3002\n    <\/p>\n<\/blockquote>\n<pre><code>async function checkServiceStatus() {\r\n  const services = ['\/api\/auth', '\/api\/payment', '\/api\/invalid-endpoint'];\r\n  const results = await Promise.allSettled(\r\n    services.map(url =&gt; fetch(url))\r\n  );\r\n  results.forEach((result, index) =&gt; {\r\n    if (result.status === 'fulfilled') {\r\n      console.log(`Service ${services[index]} is OK.`);\r\n    } else {\r\n      console.error(`Service ${services[index]} is down:`, result.reason);\r\n    }\r\n  });\r\n}\r\n<\/code><\/pre>\n<h3>3. \u4e00\u756a\u65e9\u3044\u7d50\u679c\u3060\u3051\u63a1\u7528\u3057\u305f\u3044\u306a\u3089race<\/h3>\n<blockquote>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1aPromise.race<\/strong><br \/>\n      \u8907\u6570\u306ePromise\u306e\u3046\u3061\u3001\u4e00\u756a\u65e9\u304f\u5b8c\u4e86\u3057\u305f\u3082\u306e\u306e\u7d50\u679c\u3060\u3051\u3092\u8fd4\u3059\u3002\u6b8b\u308a\u306f\u7121\u8996\u3055\u308c\u308b\u3002\n    <\/p>\n<\/blockquote>\n<pre><code>function requestWithTimeout(url: string, timeout: number): Promise&lt;Response&gt; {\r\n  const timeoutPromise = new Promise&lt;never&gt;((_, reject) =&gt;\r\n    setTimeout(() =&gt; reject(new Error('Request timed out')), timeout)\r\n  );\r\n  return Promise.race([fetch(url), timeoutPromise]);\r\n}\r\n\r\nrequestWithTimeout('\/api\/heavy-process', 5000)\r\n  .then(response =&gt; console.log('Got response:', response))\r\n  .catch(error =&gt; console.error(error.message));\r\n<\/code><\/pre>\n<h3>4. \u3069\u308c\u304b\u4e00\u3064\u201c\u6210\u529f\u201d\u3067\u3044\u3044\u306a\u3089any<\/h3>\n<blockquote>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1aPromise.any<\/strong><br \/>\n      \u8907\u6570\u306ePromise\u306e\u3046\u3061\u3001\u3069\u308c\u304b1\u3064\u3067\u3082\u6210\u529f\u3057\u305f\u3089\u305d\u306e\u7d50\u679c\u3092\u8fd4\u3059\u3002\u5168\u90e8\u5931\u6557\u3057\u305f\u5834\u5408\u3060\u3051\u30a8\u30e9\u30fc\u306b\u306a\u308b\u3002\n    <\/p>\n<\/blockquote>\n<pre><code>async function fetchFromFastestCDN() {\r\n  const cdnEndpoints = [\r\n    'https:\/\/cdn1.example.com\/resource',\r\n    'https:\/\/cdn2.example.com\/resource',\r\n    'https:\/\/cdn3.example.com\/resource'\r\n  ];\r\n  try {\r\n    const fastestResponse = await Promise.any(\r\n      cdnEndpoints.map(url =&gt; fetch(url))\r\n    );\r\n    console.log('Fetched from fastest CDN:', fastestResponse.url);\r\n  } catch (error) {\r\n    console.error('All CDNs are unavailable.', error);\r\n  }\r\n}\r\n<\/code><\/pre>\n<hr \/>\n<h2>4. \u30b3\u30fc\u30c9\u30ec\u30d3\u30e5\u30fc\u3067\u6307\u6458\u3057\u305f\u3044\uff01Promise\u30a2\u30f3\u30c1\u30d1\u30bf\u30fc\u30f35\u9078<\/h2>\n<h3>\u25a0 \u300c\u3084\u308a\u304c\u3061\u300dNG\u4f8b\u3068OK\u4f8b\u3092\u30bb\u30c3\u30c8\u3067<\/h3>\n<blockquote>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u30a2\u30f3\u30c1\u30d1\u30bf\u30fc\u30f3<\/strong><br \/>\n      \u3088\u304f\u3042\u308b\u300c\u3084\u3063\u3066\u306f\u3044\u3051\u306a\u3044\u66f8\u304d\u65b9\u300d\u3084\u300c\u5931\u6557\u3057\u3084\u3059\u3044\u5b9f\u88c5\u4f8b\u300d\u3002\u306a\u305cNG\u304b\u7406\u7531\u3082\u7406\u89e3\u3057\u3066\u304a\u304f\u3068\u826f\u3044\u3002\n    <\/p>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u30b3\u30fc\u30c9\u30ec\u30d3\u30e5\u30fc<\/strong><br \/>\n      \u4ed6\u306e\u958b\u767a\u8005\u304c\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3092\u30c1\u30a7\u30c3\u30af\u3057\u3001\u30df\u30b9\u3084\u6539\u5584\u70b9\u3092\u6307\u6458\u3059\u308b\u5de5\u7a0b\u3002\u54c1\u8cea\u5411\u4e0a\u3084\u5b66\u3073\u5408\u3044\u306b\u5f79\u7acb\u3064\u3002\n    <\/p>\n<\/blockquote>\n<ol>\n<li>\n      <strong>new Promise\u306e\u4e2d\u3067async\/await\u3092\u4f7f\u3046<\/strong><br \/>\n      <br \/>async\u95a2\u6570\u306f\u305d\u308c\u81ea\u4f53\u304cPromise\u3002\u5185\u90e8\u3067new Promise\u306f\u5197\u9577\u3067\u3059\u3002 <br \/><em>NG\u4f8b\uff1a<\/em><\/p>\n<pre><code>function ngFetch(): Promise&lt;string&gt; {\r\n  return new Promise(async (resolve, reject) =&gt; {\r\n    try {\r\n      const response = await fetch('\/api\/data');\r\n      resolve(await response.text());\r\n    } catch (e) {\r\n      reject(e);\r\n    }\r\n  });\r\n}\r\n<\/code><\/pre>\n<p>      <em>OK\u4f8b\uff1a<\/em><\/p>\n<pre><code>async function okFetch(): Promise&lt;string&gt; {\r\n  const response = await fetch('\/api\/data');\r\n  return response.text();\r\n}\r\n<\/code><\/pre>\n<\/li>\n<li>\n      <strong>\u30eb\u30fc\u30d7\u5185\u3067await\u3001\u4e26\u5217\u5316\u3067\u304d\u3066\u306a\u3044<\/strong><br \/>\n      <br \/>await\u3092\u30eb\u30fc\u30d7\u5185\u3067\u90fd\u5ea6\u5b9f\u884c\u3059\u308b\u3068\u3001\u76f4\u5217\u51e6\u7406\u306b\u2026\u3002 <br \/><em>NG\u4f8b\uff1a<\/em><\/p>\n<pre><code>async function ngFetchUsers(ids: string[]) {\r\n  const users = [];\r\n  for (const id of ids) {\r\n    users.push(await fetch(`\/api\/users\/${id}`));\r\n  }\r\n  return Promise.all(users);\r\n}\r\n<\/code><\/pre>\n<p>      <em>OK\u4f8b\uff1a<\/em><\/p>\n<pre><code>async function okFetchUsers(ids: string[]) {\r\n  const userPromises = ids.map(id =&gt; fetch(`\/api\/users\/${id}`));\r\n  return await Promise.all(userPromises);\r\n}\r\n<\/code><\/pre>\n<\/li>\n<li>\n      <strong>.then()\u306ereturn\u6f0f\u308c<\/strong><br \/>\n      <br \/>.then()\u306e\u4e2d\u3067return\u3092\u66f8\u304d\u5fd8\u308c\u308b\u3068\u3001\u6b21\u306e.then()\u306b\u5024\u304c\u6e21\u308a\u307e\u305b\u3093\u3002 <br \/><em>NG\u4f8b\uff1a<\/em><\/p>\n<pre><code>fetch('\/api\/user\/1')\r\n  .then(response =&gt; response.json())\r\n  .then(user =&gt; {\r\n    console.log(user.name);\r\n    \/\/ return\u3092\u66f8\u304d\u5fd8\u308c\r\n  })\r\n  .then(result =&gt; {\r\n    console.log(result); \/\/ undefined\r\n  });\r\n<\/code><\/pre>\n<p>      <em>OK\u4f8b\uff1a<\/em><\/p>\n<pre><code>fetch('\/api\/user\/1')\r\n  .then(response =&gt; response.json())\r\n  .then(user =&gt; {\r\n    console.log(user.name);\r\n    return user.id; \/\/ \u660e\u793a\u7684\u306breturn\r\n  })\r\n  .then(userId =&gt; {\r\n    console.log(userId);\r\n  });\r\n<\/code><\/pre>\n<\/li>\n<li>\n      <strong>async\u95a2\u6570\u306a\u306e\u306bPromise\u3092\u8fd4\u3057\u3066\u3057\u307e\u3046<\/strong><br \/>\n      <br \/>async\u3092\u3064\u3051\u305f\u6642\u70b9\u3067Promise\u5316\u3055\u308c\u308b\u306e\u3067\u3001Promise.resolve\u3067\u5305\u3080\u306e\u306f\u5197\u9577\u3002 <br \/><em>NG\u4f8b\uff1a<\/em><\/p>\n<pre><code>async function ngGetValue(): Promise&lt;string&gt; {\r\n  return Promise.resolve('value');\r\n}\r\n<\/code><\/pre>\n<p>      <em>OK\u4f8b\uff1a<\/em><\/p>\n<pre><code>async function okGetValue(): Promise&lt;string&gt; {\r\n  return 'value';\r\n}\r\n<\/code><\/pre>\n<\/li>\n<li>\n      <strong>try-catch\u3084.catch()\u3067\u30a8\u30e9\u30fc\u3092\u63e1\u308a\u3064\u3076\u3059<\/strong><br \/>\n      <br \/>\u30a8\u30e9\u30fc\u672a\u51e6\u7406\u306ePromise\u306f\u201cunhandled promise rejection\u201d\u3068\u306a\u308a\u3001\u60f3\u5b9a\u5916\u306e\u30d0\u30b0\u8981\u56e0\u306b\u3002 <br \/><em>NG\u4f8b\uff1a<\/em><\/p>\n<pre><code>async function mightFail() {\r\n  throw new Error('Something went wrong');\r\n}\r\nmightFail(); \/\/ \u30a8\u30e9\u30fc\u30ad\u30e3\u30c3\u30c1\u3057\u3066\u3044\u306a\u3044\r\n<\/code><\/pre>\n<p>      <em>OK\u4f8b\uff1a<\/em><\/p>\n<pre><code>async function main() {\r\n  try {\r\n    await mightFail();\r\n  } catch (e) {\r\n    console.error(\"Caught an error:\", e);\r\n  }\r\n}\r\nmightFail().catch(e =&gt; console.error(\"Caught an error:\", e));\r\nmain();\r\n<\/code><\/pre>\n<\/li>\n<\/ol>\n<hr \/>\n<h2>5. \u307e\u3068\u3081\uff5c\u300c\u306a\u305c\u305d\u3046\u66f8\u304f\u304b\uff1f\u300d\u307e\u3067\u8179\u843d\u3061\u3057\u305fPromise\u8a2d\u8a08\u3092<\/h2>\n<ul>\n<li><strong>Promise\u306f\u300c\u975e\u540c\u671f\u306e\u72b6\u614b\u3092\u6301\u3064\u7bb1\u300d<\/strong><\/li>\n<li><strong>async\/await\u306fPromise\u3092\u6271\u3044\u3084\u3059\u304f\u3059\u308b\u7cd6\u8863\u69cb\u6587<\/strong><\/li>\n<li><strong>Promise&lt;T&gt;\u578b\u3001\u578b\u63a8\u8ad6\u3001unknown\u578b\u30ac\u30fc\u30c9\u3067\u201cany\u201d\u3092\u6483\u9000<\/strong><\/li>\n<li><strong>all, allSettled, race, any\u306f\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9\u3054\u3068\u306b\u9069\u5207\u306b\u9078\u629e<\/strong><\/li>\n<li><strong>\u30a2\u30f3\u30c1\u30d1\u30bf\u30fc\u30f3\u3092\u628a\u63e1\u3057\u3066\u3001\u4fdd\u5b88\u6027\u306e\u9ad8\u3044\u30b3\u30fc\u30c9\u3092\u610f\u8b58<\/strong><\/li>\n<\/ul>\n<blockquote>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u4fdd\u5b88\u6027<\/strong><br \/>\n      \u30b3\u30fc\u30c9\u304c\u300c\u76f4\u3057\u3084\u3059\u3044\u300d\u300c\u62e1\u5f35\u3057\u3084\u3059\u3044\u300d\u306a\u3069\u3001\u9577\u671f\u7684\u306b\u7ba1\u7406\u3057\u3084\u3059\u3044\u6027\u8cea\u3002\n    <\/p>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u30e6\u30fc\u30b9\u30b1\u30fc\u30b9<\/strong><br \/>\n      \u3069\u3093\u306a\u5834\u9762\u30fb\u76ee\u7684\u3067\u4f7f\u3046\u304b\u3068\u3044\u3046\u5177\u4f53\u7684\u306a\u5229\u7528\u4f8b\u3084\u60f3\u5b9a\u30b7\u30ca\u30ea\u30aa\u3002\n    <\/p>\n<\/blockquote>\n<p>\n    \u201c\u306a\u3093\u3068\u306a\u304f\u66f8\u3051\u308b\u201d\u304b\u3089\u201c\u306a\u305c\u305d\u3046\u66f8\u304f\u3079\u304d\u304b\u201d\u304c\u8179\u843d\u3061\u3059\u308c\u3070\u3001<br \/>\n    \u3042\u306a\u305f\u306e\u30b3\u30fc\u30c9\u54c1\u8cea\u3082\u3001\u30c1\u30fc\u30e0\u306e\u751f\u7523\u6027\u3082\u30b0\u30f3\u3068\u9ad8\u307e\u308a\u307e\u3059\u3002<\/p>\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\n  <\/p>\n<hr \/>\n<h2>FAQ\uff5c\u3088\u304f\u3042\u308b\u7591\u554f\u306b\u56de\u7b54<\/h2>\n<ul>\n<li>\n      <strong>Q. <code>Promise&lt;void&gt;<\/code>\u306f\u3069\u3093\u306a\u3068\u304d\u4f7f\u3046\uff1f<\/strong><br \/>\n      A. \u8fd4\u308a\u5024\u304c\u4e0d\u8981\u306a\u975e\u540c\u671f\u51e6\u7406\u3067\u4f7f\u3044\u307e\u3059\u3002\u4f8b\uff1aDB\u66f4\u65b0API\u547c\u3073\u51fa\u3057\u306a\u3069\u300c\u5b8c\u4e86\u3060\u3051\u5f85\u3066\u3070OK\u300d\u306a\u3068\u304d\u3002\n    <\/li>\n<li>\n      <strong>Q. .then()\u306e\u4e2d\u3067fetch\u3092\u547c\u3076\u306e\u306fNG\uff1f<\/strong><br \/>\n      A. \u5fc5\u305a\u3057\u3082NG\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u30cd\u30b9\u30c8\u304c\u6df1\u304f\u306a\u308b\u306a\u3089async\/await\u3067\u30d5\u30e9\u30c3\u30c8\u306b\u66f8\u304d\u76f4\u3059\u3068\u53ef\u8aad\u6027UP\u3067\u3059\u3002\n    <\/li>\n<li>\n      <strong>Q. async\u95a2\u6570\u306btry-catch\u306a\u3057\u3060\u3068\u3069\u3046\u306a\u308b\uff1f<\/strong><br \/>\n      A. \u30a8\u30e9\u30fc\u672a\u6355\u6349\u306ePromise\u306f\u300cunhandled promise rejection\u300d\u3068\u306a\u308a\u3001\u30d6\u30e9\u30a6\u30b6\u306a\u3089\u30b3\u30f3\u30bd\u30fc\u30eb\u30a8\u30e9\u30fc\u3001Node.js\u306a\u3089\u30d0\u30fc\u30b8\u30e7\u30f3\u6b21\u7b2c\u3067\u30d7\u30ed\u30bb\u30b9\u30af\u30e9\u30c3\u30b7\u30e5\u3082\u3002\u5fc5\u305a\u3069\u3053\u304b\u3067\u30ad\u30e3\u30c3\u30c1\u3057\u307e\u3057\u3087\u3046\u3002\n    <\/li>\n<li>\n      <strong>Q. Promise.resolve()\u3084Promise.reject()\u306f\u3044\u3064\u4f7f\u3046\uff1f<\/strong><br \/>\n      A. \u30c6\u30b9\u30c8\u3084\u30e2\u30c3\u30af\u3001\u5024\u3092\u5f37\u5236\u7684\u306bPromise\u5316\u3057\u305f\u3044\u6642\u306a\u3069\u3002\u300c\u540c\u671f\u5024\u3092Promise\u30c1\u30a7\u30fc\u30f3\u306b\u8f09\u305b\u305f\u3044\u300d\u5834\u9762\u3067\u4fbf\u5229\u3067\u3059\u3002\n    <\/li>\n<\/ul>\n<blockquote>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1avoid\u578b<\/strong><br \/>\n      \u300c\u4f55\u3082\u5024\u3092\u8fd4\u3055\u306a\u3044\u300d\u3053\u3068\u3092\u660e\u793a\u3059\u308b\u578b\u3002Promise\u306f\u300c\u5b8c\u4e86\u3057\u305f\u3089OK\u300d\u3068\u3044\u3046\u975e\u540c\u671f\u51e6\u7406\u3067\u4f7f\u3046\u3002\n    <\/p>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u30cd\u30b9\u30c8<\/strong><br \/>\n      if\u6587\u3084\u95a2\u6570\u306a\u3069\u304c\u300c\u5165\u308c\u5b50\u300d\u306b\u306a\u3063\u3066\u6df1\u304f\u306a\u308b\u3053\u3068\u3002\u6df1\u3044\u3068\u8aad\u307f\u306b\u304f\u304f\u30d0\u30b0\u306e\u6e29\u5e8a\u306b\u306a\u308b\u3002\n    <\/p>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1aunhandled promise rejection<\/strong><br \/>\n      Promise\u306e\u30a8\u30e9\u30fc\u304c\u3069\u3053\u306b\u3082\u6355\u6349\u3055\u308c\u305a\u653e\u7f6e\u3055\u308c\u305f\u72b6\u614b\u3002\u30d0\u30b0\u3084\u4e88\u671f\u305b\u306c\u52d5\u4f5c\u306e\u539f\u56e0\u306b\u306a\u308b\u3002\n    <\/p>\n<p>\n      <strong>\u7528\u8a9e\u89e3\u8aac\uff1a\u30e2\u30c3\u30af<\/strong><br \/>\n      \u30c6\u30b9\u30c8\u7528\u306b\u672c\u7269\u306e\u4ee3\u308f\u308a\u3068\u306a\u308b\u300c\u30c0\u30df\u30fc\u306e\u51e6\u7406\u3084\u30c7\u30fc\u30bf\u300d\u3092\u7528\u610f\u3059\u308b\u3053\u3068\u3002\n    <\/p>\n<\/blockquote>\n<hr \/>\n<\/div>\n","protected":false},"featured_media":1799,"template":"","_links":{"self":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/route\/1798"}],"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\/1799"}],"wp:attachment":[{"href":"https:\/\/route-zero.com\/recruit\/wp-json\/wp\/v2\/media?parent=1798"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}