{"id":84922,"date":"2020-05-15T00:14:12","date_gmt":"2020-05-14T16:14:12","guid":{"rendered":"http:\/\/4563.org\/?p=84922"},"modified":"2020-05-15T00:14:12","modified_gmt":"2020-05-14T16:14:12","slug":"%e4%b8%ba%e4%bb%80%e4%b9%88%e6%88%91%e7%9a%84-js-%e6%96%87%e4%bb%b6%ef%bc%8c%e4%bc%9a%e6%8a%a5%e9%94%99%e6%8f%90%e7%a4%ba-typescript-1005-%e7%9a%84%e9%97%ae%e9%a2%98%ef%bc%9f","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=84922","title":{"rendered":"\u4e3a\u4ec0\u4e48\u6211\u7684.js \u6587\u4ef6\uff0c\u4f1a\u62a5\u9519\u63d0\u793a TypeScript 1005 \u7684\u95ee\u9898\uff1f"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u4e3a\u4ec0\u4e48\u6211\u7684.js \u6587\u4ef6\uff0c\u4f1a\u62a5\u9519\u63d0\u793a TypeScript 1005 \u7684\u95ee\u9898\uff1f               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : yazoox <\/span>  <span><i><\/i> 9<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u5b66\u4e60\u4f7f\u7528 express server,\u4e8e\u662f\u5efa\u7acb \u4e86\u4e00\u4e2a\u65b0\u9879\u76ee package.json<\/p>\n<pre><code>{     \"name\": \"@my\/server\",     \"version\": \"1.0.0\",     \"scripts\": {         \"server\": \"node src\/express-server.js\"     },     \"dependencies\": {         \"express\": \"^4.17.1\",         \"lodash\": \"^4.17.15\"     } }  <\/code><\/pre>\n<p>\u7136\u540e\u65b0\u5efa\u7acb\u4e86\u4e00\u4e2a baseDB.js (\u662f\u4e00\u4e2a js \u6587\u4ef6\uff0c\u4e0d\u662f ts \u6587\u4ef6\uff09<\/p>\n<pre><code> class baseDB {     constructor() {         this.items = [];     }      load() {         \/\/ will be implemented in the sub-class         console.log(\"will be implemented in the sub-class\");     }      aync save() {         console.log(\"will be implemented in the sub-class\");     } } <\/code><\/pre>\n<p>\u7136\u540e\u6709\u5173\u952e\u5b57<code>aync<\/code>\u7684\u90a3\u4e00\u884c\uff0c\u5c31\u63d0\u793a\u6709\u9519\u8bef\u3002<code>';' expected.ts(1005)<\/code><\/p>\n<p>\u5927\u5bb6\u6709\u6ca1\u6709\u78b0\u5230\u7c7b\u4f3c\u7684\u95ee\u9898\uff1f\u8c22\u8c22\uff01<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2020\/05\/20200516_5ebfae45bd358.jpg\" alt=\"\u4e3a\u4ec0\u4e48\u6211\u7684.js \u6587\u4ef6\uff0c\u4f1a\u62a5\u9519\u63d0\u793a TypeScript 1005 \u7684\u95ee\u9898\uff1f\" \/><\/p>\n<p>p.s. https:\/\/github.com\/microsoft\/vscode\/issues\/54261<\/p>\n<p>VSCode github \u4e0a\u9762\u66fe\u7ecf\u6709\u7c7b\u4f3c\u7684\u95ee\u9898\uff0c2018 \u5e74\u62a5\u7684\uff0c\u53ef\u60dc\uff0c\u90a3\u4e2a\u5e16\u5b50\u4e0d\u4e86\u4e86\u4e4b\u4e86&#8230;&#8230;<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>9<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"1396822\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xg4 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             async\uff0c\u4e0d\u662f aync                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1396823\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : rbe <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             typescript.validate.enable \u8bbe\u4e3a false                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1396824\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : rbe <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @rbe #2 \u4e0d\u8fc7\u4e0d\u5efa\u8bae\u5173\u6389\uff0c\u50cf\u4f60\u8fd9\u4e2a\u660e\u663e\u62fc\u5199\u9519\u8bef\uff0c\u68c0\u67e5\u51fa\u6765\u662f\u597d\u4e8b                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1396825\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : noe132 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             async.                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1396826\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : yazoox <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @xg4 <br \/>\u597d\u5427\uff0c\u8111\u5b50\u8d8a\u6765\u8d8a\u8fdf\u949d\u4e86&#8230;&#8230; <br \/>\u8c22\u8c22\uff01                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1396827\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : chengxy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5b8c\u4e86\uff0c\u5220\u4e0d\u6389\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1396828\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : yuang <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u63a8\u8350 spell checker \u8fd9\u4e2a VScode \u63d2\u4ef6\uff0c\u7528\u4e8e\u68c0\u67e5\u62fc\u5199\u9519\u8bef                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1396829\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xieranmaya <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             vscode \u4f1a\u81ea\u52a8\u5bf9 js \u6267\u884c ts \u7684\u8bed\u6cd5\u53ca\u7c7b\u578b\u68c0\u67e5                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1396830\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ChineseCabbage <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @chengxy \u54c8\u54c8\u54c8\u54c8 \u8fd9\u4e2a\u5fc3\u7406\u8ddf\u6211\u4e00\u6a21\u4e00\u6837                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u4e3a\u4ec0\u4e48\u6211\u7684.js \u6587\u4ef6\uff0c\u4f1a\u62a5\u9519\u63d0\u793a&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/84922"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=84922"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/84922\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=84922"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=84922"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=84922"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}