{"id":13535,"date":"2019-04-08T09:00:47","date_gmt":"2019-04-08T00:00:47","guid":{"rendered":"https:\/\/www.agent-grow.com\/self20percent\/?p=13535"},"modified":"2019-03-27T15:42:55","modified_gmt":"2019-03-27T06:42:55","slug":"javascript-and-typescript-decorator","status":"publish","type":"post","link":"https:\/\/www.agent-grow.com\/self20percent\/2019\/04\/08\/javascript-and-typescript-decorator\/","title":{"rendered":"\u3084\u3063\u3071\u308a JavaScript (TypeScript) \u3067\u3082 \u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3 (Decorator) \u4f7f\u3044\u305f\u3044\uff01"},"content":{"rendered":"<h1>JavaScript \u3067\u3082\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3057\u305f\u3044\uff01<\/h1>\n<p>\u3053\u3093\u306b\u3061\u306f\u3001\u6c5f\u5d5c\u3067\u3059\u3002<\/p>\n<p>JavaScript \u30d0\u30ea\u30d0\u30ea\u66f8\u3044\u3066\u307e\u3059\u304b\uff1f<\/p>\n<p>JavaScript \u3092\u30ac\u30c3\u30c4\u30ea\u66f8\u3044\u3066\u3044\u308b\u3068\u3001<\/p>\n<ul>\n<li>\u3084\u3063\u3071\u308a\u578b\u304c\u6b32\u3057\u304f\u306a\u3063\u305f\u308a<\/li>\n<li>Enum \u6b32\u3057\u304f\u306a\u3063\u305f\u308a<\/li>\n<li>Interface \u6b32\u3057\u304f\u306a\u3063\u305f\u308a<\/li>\n<\/ul>\n<p>\u307f\u305f\u3044\u306a\u3053\u3068\u3042\u3063\u3066\u3001TypeScript \u4f7f\u3063\u3061\u3083\u3046\u3093\u3067\u3059\u306d\u3002<br \/>\n\u3084\u3063\u3071\u308a\u3042\u3063\u305f\u65b9\u304c\u4fbf\u5229\u3067\u3059\u304b\u3089\u306d\u3002<\/p>\n<p>\u3067\u3001\u6b21\u306f\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u6b32\u3057\u3044\u3093\u3067\u3059\u304b\uff1f<br \/>\nTypeScript \u306b\u3082\u3042\u308a\u307e\u3059\u3088\uff01\u826f\u304b\u3063\u305f\u3067\u3059\u306d\uff01<\/p>\n<p>(\u3082\u3046 Java \u66f8\u3044\u3066\u308c\u3070\u3044\u3044\u3093\u3058\u3083\u306a\u3044\u304b\u3063\u3066\u6c17\u304c\u3057\u306a\u304f\u3082\u306a\u3044)<\/p>\n<h1>\u5b9f\u969b\u306b\u66f8\u3044\u3066\u307f\u3088\u3046\uff01<\/h1>\n<p>\u5148\u307b\u3069\u306f\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3068\u3044\u3046\u540d\u524d\u3092\u4f7f\u3044\u307e\u3057\u305f\u304c\u3001\u3053\u308c\u306f Java \u3067\u306e\u547c\u3073\u65b9\u3067\u3059\u306d\u3002<br \/>\nJavaScript \u3067\u306f\u30c7\u30b3\u30ec\u30fc\u30bf\u30fc\u3068\u3044\u3046\u540d\u524d\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u5927\u4f53\u51fa\u6765\u308b\u3053\u3068\u306f\u540c\u3058\u306a\u306e\u3067\u3001\u547c\u3073\u65b9\u304c\u9055\u3046\u3093\u3060\u306a\u3068\u3044\u3046\u7a0b\u5ea6\u306e\u8003\u3048\u65b9\u3067 OK \u3067\u3059\u3002<\/p>\n<p>\u30c7\u30b3\u30ec\u30fc\u30bf\u30fc\u306f\u3001\u3042\u308b\u30af\u30e9\u30b9\u3084\u30e1\u30bd\u30c3\u30c9\u3001\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u306b\u5bfe\u3057\u3066\u3001\u305d\u306e\u52d5\u304d\u3092\u8ffd\u52a0\u3057\u305f\u308a\u5909\u66f4\u3057\u305f\u308a\u3068\u3001<br \/>\n\u30c7\u30b3\u30ec\u30fc\u30b7\u30e7\u30f3\u51fa\u6765\u308b\u6a5f\u80fd\u306a\u3093\u3067\u3059\u306d\uff01<\/p>\n<p>\u4eca\u56de\u306f\u3001\u4e00\u756a\u5206\u304b\u308a\u3084\u3059\u3044\u30e1\u30bd\u30c3\u30c9\u306b\u5bfe\u3059\u308b\u30c7\u30b3\u30ec\u30fc\u30bf\u30fc\u3092\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h2>\u307e\u305a\u306f\u30c7\u30b3\u30ec\u30fc\u30bf\u30fc\u306a\u3057\u3067\u540c\u3058\u3053\u3068\u3092\u3084\u3063\u3066\u307f\u308b<\/h2>\n<p>\u2026\u3068\u3001\u307e\u305a\u306f\u30c7\u30b3\u30ec\u30fc\u30bf\u30fc\u306a\u3057\u3067\u540c\u3058\u3053\u3068\u3092\u66f8\u3044\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u4eca\u56de\u306f TypeScript \u3067\u66f8\u3044\u3066\u3044\u304d\u307e\u3059\u306d\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u3001\u30c7\u30b3\u30ec\u30fc\u30bf\u30fc\u306f\u307e\u3060\u5b9f\u9a13\u6bb5\u968e\u306e\u5185\u5bb9\u306e\u70ba\u3001<br \/>\nTypeScript \u3067\u306e\u30b3\u30f3\u30d1\u30a4\u30eb\u6642\u306b\u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u6307\u5b9a\u3057\u3066\u3042\u3052\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3068\u308a\u3042\u3048\u305a<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nnpm install -g typescript\n<\/pre>\n<p>\u3068\u3067\u3082\u3057\u3066\u3001 TypeScript \u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u304a\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u30b5\u30f3\u30d7\u30eb\u306f\u3053\u3093\u306a\u611f\u3058\u3002<\/p>\n<p>test1.ts<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nclass Test {\n  main() {\n    console.log(\u2019exec main!\u2019);\n  };\n}\n\nconst test = new Test();\ntest.main();\n<\/pre>\n<p>Test \u30af\u30e9\u30b9\u304b\u3089\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u3066\u3001 main \u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3059\u3060\u3051\u3067\u3059\u306d\u3002<\/p>\n<p>\u30b3\u30f3\u30d1\u30a4\u30eb\u3057\u3066\u5b9f\u884c\u3057\u3066\u307f\u307e\u3059<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ntsc --target ES5 test1.ts\nnode test1.js\n<\/pre>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nexec main!\n<\/pre>\n<p>\u3053\u3053\u307e\u3067\u306f\u3044\u3044\u3067\u3059\u3088\u306d\u3002<\/p>\n<p>\u3055\u3066\u3001\u3053\u3053\u3067\uff08\u5b9a\u756a\u3067\u3059\u304c\uff09\u3001main \u5b9f\u884c\u524d\u306b\u30ed\u30b0\u3092\u51fa\u529b\u3059\u308b\u3059\u308b\u3088\u3046\u306b\u3057\u305f\u3044\u3068\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nfunction log(fn: Function) {\n  console.log(\u2019exec log!\u2019);\n  return fn();\n};\n\nclass Test {\n  main() {\n    console.log(\u2019exec main!\u2019);\n  }\n}\n\nconst test = new Test();\nlog(test.main);\n<\/pre>\n<p>\u3053\u3093\u306a\u611f\u3058\u3067\u3059\u304b\u306d\u3002<\/p>\n<p>JavaScript \u3067\u306f\u5f15\u6570\u306b\u95a2\u6570\u3092\u6e21\u305b\u307e\u3059\u304b\u3089\u3001<br \/>\nlog \u95a2\u6570\u306e\u5f15\u6570\u306b main \u306e\u95a2\u6570\u3092\u6e21\u3057\u3066\u3001<br \/>\n\u30ed\u30b0\u3092\u51fa\u529b\u5f8c\u306b\u6e21\u3055\u308c\u305f\u95a2\u6570\u3092\u5b9f\u884c\u3059\u308b\u3001\u3068\u3044\u3046\u6d41\u308c\u3067\u3044\u304d\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u3053\u3067\u3084\u3063\u305f\u306e\u306f\u3001log \u3068\u3044\u3046\u95a2\u6570\u3092\u5225\u3067\u5b9a\u7fa9\u3057\u3066\u3001main \u95a2\u6570\u3092\u6e21\u3059\u3053\u3068\u3067\u3001<br \/>\nmain \u306e\u52d5\u4f5c\u6642\u306b log \u306e\u52d5\u4f5c\u3092\u4ed8\u3051\u52a0\u3048\u305f\u3001\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>\u30c7\u30b3\u30ec\u30fc\u30bf\u30fc\u3092\u4f7f\u3063\u3066\u307f\u308b<\/h2>\n<p>\u3055\u3066\u3001\u3067\u306f\u3053\u3053\u3067\u30c7\u30b3\u30ec\u30fc\u30bf\u30fc\u3092\u4f7f\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u5148\u307b\u3069\u3068\u540c\u3058\u3088\u3046\u306a\u5185\u5bb9\u3067\u3001\u30c7\u30b3\u30ec\u30fc\u30bf\u30fc\u3092\u4f7f\u3063\u3066\u307f\u308b\u3068\u3053\u3093\u306a\u611f\u3058\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nfunction log() {\n  return function(target: any, propertyKey: string, descriptor: PropertyDescriptor) {\n\n    \/\/ \u30c7\u30b3\u30ec\u30fc\u30bf\u30fc\u304c\u8a2d\u5b9a\u3055\u308c\u305f\u95a2\u6570\u3092 origin \u306b\u4fdd\u5b58\n    const origin = descriptor.value;\n\n    \/\/ \u95a2\u6570\u3092\u66f8\u304d\u63db\u3048\u308b\n    descriptor.value = function(...args) {\n      console.log(\u2019decorate exec!\u2019);\n\n      \/\/ \u5143\u306e\u95a2\u6570\u3092\u547c\u3076\n      origin.apply(this, args);\n    };\n  }\n};\n\nclass Test {\n  @log()\n  main() {\n    console.log(\u2019exec main!\u2019);\n  }\n}\n\nconst test = new Test();\ntest.main();\n<\/pre>\n<p>\u306a\u3093\u304b\u7a81\u7136\u96e3\u3057\u305d\u3046\u306a\u611f\u3058\u306b\u306a\u308a\u307e\u3057\u305f\u306d\uff1f<br \/>\n\u5b9f\u969b\u306e\u5185\u5bb9\u306f\u305d\u3046\u3067\u3082\u306a\u3044\u306e\u3067\u3001\u4e00\u3064\u305a\u3064\u307f\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nfunction log() {\n  return function(target: any, propertyKey: string, descriptor: PropertyDescriptor) {\n\n    \/\/ \u30c7\u30b3\u30ec\u30fc\u30bf\u30fc\u304c\u8a2d\u5b9a\u3055\u308c\u305f\u95a2\u6570\u3092 origin \u306b\u4fdd\u5b58\n    const origin = descriptor.value;\n\n    \/\/ \u95a2\u6570\u3092\u66f8\u304d\u63db\u3048\u308b\n    descriptor.value = function(...args) {\n      console.log(\u2019decorate exec!\u2019);\n\n      \/\/ \u5143\u306e\u95a2\u6570\u3092\u547c\u3076\n      origin.apply(this, args);\n    };\n  }\n};\n<\/pre>\n<p>\u3053\u306e\u90e8\u5206\u304c\u30c7\u30b3\u30ec\u30fc\u30bf\u30fc\u306e\u8a2d\u5b9a\u3067\u3059\u306d\u3002<br \/>\n\u30c7\u30b3\u30ec\u30fc\u30bf\u30fc\u3082\u305d\u306e\u5b9f\u3001\u5358\u7d14\u306b\u95a2\u6570\u306a\u306e\u3067\u3001 function \u3067\u5b9a\u7fa9\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nreturn function(target: any, propertyKey: string, descriptor: PropertyDescriptor) {\n<\/pre>\n<p>\u6b21\u306b\u3001 function \u3092\u8fd4\u308a\u5024\u306b\u3057\u3066\u3044\u307e\u3059\u304c\u3001<br \/>\n\u3053\u308c\u306f\u5b9f\u969b\u306b\u30c7\u30b3\u30ec\u30fc\u30bf\u30fc\u304c\u95a2\u6570\u306b\u304f\u3063\u3064\u3051\u3066\u4f7f\u7528\u3055\u308c\u305f\u3068\u304d\u306b\u5b9f\u884c\u3055\u308c\u308b\u95a2\u6570\u306b\u306a\u308a\u307e\u3059\u3002<br \/>\n(\u30c7\u30b3\u30ec\u30fc\u30bf\u30fc\u3092\u4ed8\u3051\u305f\u95a2\u6570\u304c\u547c\u3073\u51fa\u3055\u308c\u305f\u3068\u304d\u3067\u306f\u306a\u304f\u3001\u4f7f\u7528\u3055\u308c\u305f\u6642\u70b9\u3067\u3059\u306d\u3002)<\/p>\n<p>\u3053\u306e\u6642\u3001\u5f15\u6570\u306b\u306f<\/p>\n<ul>\n<li>target: \u30af\u30e9\u30b9\u306e\u30d7\u30ed\u30c8\u30bf\u30a4\u30d7<\/li>\n<li>name: \u547c\u3070\u308c\u305f\u30e1\u30bd\u30c3\u30c9\u306e\u540d\u524d (\u4eca\u56de\u306f test.main \u306a\u306e\u3067\u3001 main \u306b\u306a\u308a\u307e\u3059)<\/li>\n<li>descriptor: \u547c\u3070\u308c\u305f\u30e1\u30bd\u30c3\u30c9\u306e\u5b9a\u7fa9<\/li>\n<\/ul>\n<p>\u3053\u3053\u3067\u3001 descriptor \u304c\u5c11\u3057\u96e3\u3057\u3044\u3068\u3053\u308d\u306a\u306e\u3067\u3059\u304c\u3001 <code>Object.defineProperty()<\/code> \u3067<br \/>\n3 \u3064\u3081\u306e\u5f15\u6570\u306b\u8a2d\u5b9a\u3059\u308b\u3082\u306e\u3068\u540c\u3058\u3067\u3059\u306d\u3002<br \/>\n\u3068\u308a\u3042\u3048\u305a\u3001 <code>descriptor.value<\/code> \u306b\u5143\u3005\u306e\u30e1\u30bd\u30c3\u30c9\u3001<br \/>\n\u4eca\u56de\u306e\u5834\u5408\u306f <code>console.log(\u2019exec main!\u2019);<\/code> \u3092\u3059\u308b\u95a2\u6570\u304c\u5165\u3063\u3066\u3044\u308b\u3053\u3068\u3092\u899a\u3048\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<p>\u3053\u3053\u3067\u3001\u547c\u3070\u308c\u305f\u30e1\u30bd\u30c3\u30c9\u306e\u5b9a\u7fa9\u304c\u6e21\u3063\u3066\u304d\u3066\u3044\u308b\u306e\u3067\u3001<br \/>\n\u3053\u308c\u3092\u7de8\u96c6\u3059\u308b\u3068\u3001\u5b9a\u7fa9\u3092\u66f8\u304d\u63db\u3048\u308b\u3053\u3068\u304c\u51fa\u6765\u308b\u3001\u3068\u3044\u3046\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u3001<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nconst origin = descriptor.value;\n<\/pre>\n<p>\u3053\u3053\u3067\u4e00\u5ea6\u3001\u5143\u3005\u306e\u95a2\u6570\u306e\u5b9a\u7fa9\u3092\u9000\u907f\u3057\u307e\u3057\u3066\u3001<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ndescriptor.value = function(...args) {\n<\/pre>\n<p>\u3067\u3001\u65b0\u3057\u3044\u95a2\u6570\u306e\u5b9a\u7fa9\u3092\u4ee3\u5165\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p>\u5f15\u6570\u306e<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n...args\n<\/pre>\n<p>\u306f\u3001\u5f15\u6570\u3092\u914d\u5217\u3067\u3059\u3079\u3066\u53d7\u3051\u53d6\u308b\u66f8\u304d\u65b9\u3067\u3059\u3088\u3002<br \/>\n(\u4f8b\u3048\u3070 function hoge(&#8230;args) {} \u306b\u5bfe\u3057\u3066\u3001 hoge(1, &#8216;fuga&#8217;, true) \u3068\u547c\u3073\u51fa\u3059\u3068\u3001<br \/>\nargs \u306f [1, &#8216;fuga&#8217;, true] \u306e\u914d\u5217\u306b\u306a\u308a\u307e\u3059)<\/p>\n<p>\u4eca\u56de\u306f\u5143\u306e\u95a2\u6570\u306e\u5b9f\u884c\u524d\u306b\u30ed\u30b0\u3092\u51fa\u529b\u3057\u305f\u304b\u3063\u305f\u306e\u3067\u3001<br \/>\n\u307e\u305a<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nconsole.log(\u2019decorate exec!\u2019);\n<\/pre>\n<p>\u3067\u30ed\u30b0\u306e\u51fa\u529b\u3002<\/p>\n<p>\u305d\u308c\u306b\u7d9a\u3051\u3066\u3001<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\norigin.apply(this, args);\n<\/pre>\n<p>\u3067\u3001\u5148\u307b\u3069\u9000\u907f\u3055\u305b\u3066\u304a\u3044\u305f\u95a2\u6570\u3092\u3001\u5f15\u6570\u3092\u6e21\u3057\u3066\u5b9f\u884c\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n(apply \u306f\u7b2c\u4e00\u5f15\u6570\u306b\u5b9f\u884c\u6642\u306e this \u3092\u6307\u5b9a\u3001\u7b2c\u4e8c\u5f15\u6570\u306b\u5b9f\u884c\u6642\u306e\u5f15\u6570\u3092\u914d\u5217\u306e\u5f62\u3067\u6e21\u3059\u3053\u3068\u3067\u3001<br \/>\n\u95a2\u6570\u3092\u5b9f\u884c\u3057\u3066\u304f\u308c\u308b\u547d\u4ee4\u3067\u3059\u306d\uff09<\/p>\n<p>\u3053\u3053\u307e\u3067\u3067\u304d\u308c\u3070\u30c7\u30b3\u30ec\u30fc\u30bf\u30fc\u306e\u8a2d\u5b9a\u306f\u7d42\u308f\u308a\u3067\u3059\u3002<\/p>\n<p>\u6700\u5f8c\u306b\u3001<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n  @log()\n  main() {\n<\/pre>\n<p>\u306e\u3088\u3046\u306b\u3001\u30c7\u30b3\u30ec\u30fc\u30bf\u30fc\u3092\u9069\u7528\u3057\u305f\u3044\u30e1\u30bd\u30c3\u30c9\u306b\u5bfe\u3057\u3066\u3001<br \/>\n@\u95a2\u6570\u540d() \u3068\u3057\u3066\u982d\u306b\u304f\u3063\u3064\u3051\u3066\u3042\u3052\u308c\u3070\u3001\u30c7\u30b3\u30ec\u30fc\u30bf\u30fc\u3092\u4f7f\u7528\u3057\u3066\u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u305b\u308b\u3068\u3044\u3046\u5bf8\u6cd5\u3067\u3059\u306d\u3002<\/p>\n<h1>\u307e\u3068\u3081<\/h1>\n<p>\u307e\u305a\u306f\u3001\u3068\u3044\u3046\u3068\u3053\u308d\u3067\u3001\u30c7\u30b3\u30ec\u30fc\u30bf\u30fc\u306e\u66f8\u304d\u65b9\u3092\u5b66\u3093\u3067\u307f\u307e\u3057\u305f\u3002<br \/>\n\u3044\u304b\u304c\u3067\u3057\u3087\u3046\u304b\u3002<br \/>\n\u3082\u3057\u304b\u3057\u305f\u3089\u3001\u307e\u3060\u4f55\u304c\u3069\u3046\u4fbf\u5229\u306a\u306e\u304b\u3001\u3068\u3044\u3046\u3068\u3053\u308d\u304c\u3044\u307e\u3044\u3061\u30d4\u30f3\u3068\u6765\u3066\u3044\u306a\u3044\u304b\u3082\u3057\u308c\u306a\u3044\u3067\u3059\u306d\u3002<\/p>\n<p>\u3053\u3053\u3067\u6ce8\u76ee\u3057\u305f\u3044\u306e\u306f\u3001\u30c7\u30b3\u30ec\u30fc\u30bf\u30fc\u3092\u4f7f\u3048\u3070<br \/>\nmiddleware \u306e\u3088\u3046\u306b\u524d\u5f8c\u306b\u51e6\u7406\u3092\u8ffd\u52a0\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u304c\u3001<br \/>\n\u95a2\u6570\u306e\u6319\u52d5\u305d\u306e\u3082\u306e\u3082\u5909\u3048\u308b\u3053\u3068\u304c\u51fa\u6765\u3066\u3057\u307e\u3046\u3001\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002<br \/>\n(\u4eca\u56de\u306f apply \u3067\u5143\u306e\u95a2\u6570\u3092\u305d\u306e\u307e\u307e\u547c\u3073\u51fa\u3057\u307e\u3057\u305f\u304c\u3001\u305d\u3053\u3092\u5de5\u592b\u3059\u308b\u3068\u8272\u3005\u3067\u304d\u305d\u3046\u3067\u3059\u3088\u306d)<\/p>\n<p>\u4f8b\u3048\u3070\u3001 Express \u3092\u4f7f\u3046\u969b\u306b\u666e\u901a\u3067\u3042\u308c\u3070\u30eb\u30fc\u30bf\u30fc\u3092\u4f7f\u7528\u3057\u3066<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\napp.get(\u2019\/hoge\u2019, function(req, res) {\n  \/\/\u51e6\u7406\n});\n<\/pre>\n<p>\u307f\u305f\u3044\u306b\u66f8\u3044\u3066\u3001 <code>\/hoge<\/code> \u306b Get \u3067\u30a2\u30af\u30bb\u30b9\u3055\u308c\u305f\u3068\u304d\u306e\u6319\u52d5\u3092\u66f8\u3044\u305f\u308a\u3057\u307e\u3059\u304c\u3001<br \/>\n\u30c7\u30b3\u30ec\u30fc\u30bf\u30fc\u3092\u4f7f\u3048\u3070<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n@Get(\u2019\/hoge\u2019)\n<\/pre>\n<p>\u307f\u305f\u3044\u306a\u30c7\u30b3\u30ec\u30fc\u30bf\u30fc\u3092\u4f7f\u3063\u3066\u5b9a\u7fa9\u304c\u66f8\u3051\u308b\u3088\u3046\u306b\u306a\u3063\u305f\u308a\u3057\u305d\u3046\u3067\u3059\u3088\u306d\uff1f<\/p>\n<p>\u7686\u3055\u3093\u3082\u3001JavaScript \u3067\u30c7\u30b3\u30ec\u30fc\u30bf\u30fc\u3068\u3044\u3046\u3082\u306e\u3092\u4f7f\u3046\u9078\u629e\u80a2\u3067\u3001<br \/>\n\u30e9\u30af\u3092\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u306d\u3002<br \/>\n(2019\/03 \u73fe\u5728\u3067\u306f\u3001\u307e\u3060\u5b9f\u9a13\u6bb5\u968e\u306e\u70ba\u3001\u4ed5\u69d8\u304c\u5909\u308f\u308b\u53ef\u80fd\u6027\u306b\u306f\u304a\u6c17\u3092\u3064\u3051\u3066\uff01)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>JavaScript \u3067\u3082\u30a2\u30ce\u30c6\u30fc\u30b7\u30e7\u30f3\u3057\u305f\u3044\uff01 \u3053\u3093\u306b\u3061\u306f\u3001\u6c5f\u5d5c\u3067\u3059\u3002 JavaScript \u30d0\u30ea\u30d0\u30ea\u66f8\u3044\u3066\u307e\u3059\u304b\uff1f JavaScript \u3092\u30ac\u30c3\u30c4\u30ea\u66f8\u3044\u3066\u3044\u308b\u3068\u3001 \u3084\u3063\u3071\u308a\u578b\u304c\u6b32\u3057\u304f\u306a\u3063\u305f\u308a Enum \u6b32\u3057\u304f\u306a\u3063\u305f\u308a [&hellip;]<\/p>\n","protected":false},"author":15,"featured_media":13614,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[10],"tags":[45,490],"class_list":["post-13535","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tech","tag-javascript","tag-typescript"],"jetpack_featured_media_url":"https:\/\/www.agent-grow.com\/self20percent\/wp-content\/uploads\/2019\/03\/850c7612116999490846136e772ab7fd-3.png","jetpack_shortlink":"https:\/\/wp.me\/p7Bq4F-3wj","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.agent-grow.com\/self20percent\/wp-json\/wp\/v2\/posts\/13535","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.agent-grow.com\/self20percent\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.agent-grow.com\/self20percent\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.agent-grow.com\/self20percent\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/www.agent-grow.com\/self20percent\/wp-json\/wp\/v2\/comments?post=13535"}],"version-history":[{"count":0,"href":"https:\/\/www.agent-grow.com\/self20percent\/wp-json\/wp\/v2\/posts\/13535\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.agent-grow.com\/self20percent\/wp-json\/wp\/v2\/media\/13614"}],"wp:attachment":[{"href":"https:\/\/www.agent-grow.com\/self20percent\/wp-json\/wp\/v2\/media?parent=13535"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.agent-grow.com\/self20percent\/wp-json\/wp\/v2\/categories?post=13535"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.agent-grow.com\/self20percent\/wp-json\/wp\/v2\/tags?post=13535"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}