{"id":106770,"date":"2020-05-28T20:38:50","date_gmt":"2020-05-28T12:38:50","guid":{"rendered":"http:\/\/4563.org\/?p=106770"},"modified":"2020-05-28T20:38:50","modified_gmt":"2020-05-28T12:38:50","slug":"ts-%e7%b1%bb%e5%9e%8b%e6%8e%a8%e5%af%bc%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=106770","title":{"rendered":"ts \u7c7b\u578b\u63a8\u5bfc\u95ee\u9898"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  ts \u7c7b\u578b\u63a8\u5bfc\u95ee\u9898               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : lamada <\/span>  <span><i><\/i> 1<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u6211\u6709\u4e00\u4e2a system \u7ba1\u7406\u4e86\u5f88\u591a model\uff0c\u6709\u4e00\u4e9b model \u53ef\u80fd\u4f1a\u7528\u5230\u5176\u4ed6 model \u7684\u65b9\u6cd5\uff0c\u6709\u4ec0\u4e48\u529e\u6cd5\u53ef\u4ee5\u5728\u4e00\u4e2a model \u5728\u4e0d\u5f15\u7528\u5176\u4ed6 model \u7684\u60c5\u51b5\u4e0b\u83b7\u5f97\u7c7b\u578b\u63a8\u5bfc\uff1f\u9664\u4e86\u5355\u72ec\u7f16\u5199 d.ts<\/p>\n<pre><code>\/\/ \u8fd9\u91cc\u8fd0\u884c\u662f a,b \u53ef\u80fd\u90fd\u662f\u5f02\u6b65\u52a0\u8f7d\u7684\uff0c\u6253\u5305\u65f6\u76f8\u4e92\u4e0d\u5f15\u7528  \/\/ a.ts class A {  bar (name: string): void {} }   \/\/ b.ts class B {  foo () {      \/\/ root \u6307\u4ee3\u7684\u662f system\uff0c\u901a\u8fc7 system \u83b7\u53d6\u5176\u4ed6 model \u3002\u8fd9\u91cc\u60f3\u83b7\u5f97 bar \u7684\u7c7b\u578b\u63a8\u5bfc      this.root.a.bar('hello')     } } <\/code><\/pre>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>6<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"1774787\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : SilentDepth <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             Type-only imports and exports                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1774788\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : SilentDepth <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \uff08\u8865\u94fe\u63a5\uff09<br \/>https:\/\/www.typescriptlang.org\/docs\/handbook\/release-notes\/typescript-3-8.html                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1774789\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : lamada <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @SilentDepth nb, \u73b0\u5728\u5df2\u7ecf\u8fd9\u4e48\u9ad8\u7ea7\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1774790\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : lamada <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @SilentDepth \u5c31\u662f eslint \u597d\u50cf\u8fd8\u6ca1\u652f\u6301\uff0c\u6709\u70b9\u86cb\u75bc                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1774791\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : shunf4 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @lamada \u652f\u6301\u4e86\u5427\uff0c\u6211\u4e00\u76f4\u8fd9\u4e48\u641e                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1774792\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : lamada <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @shunf4 \u53ef\u80fd\u6211 ts \u7248\u672c\u592a\u4f4e\u4e86\uff0c\u66f4\u65b0\u4e86\u597d\u50cf\u53ef\u4ee5\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>ts \u7c7b\u578b\u63a8\u5bfc\u95ee\u9898 \u8cc7\u6df1\u5927\u4f6c : &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\/106770"}],"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=106770"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/106770\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=106770"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=106770"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=106770"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}