{"id":441591,"date":"2021-04-14T06:13:46","date_gmt":"2021-04-13T22:13:46","guid":{"rendered":"http:\/\/4563.org\/?p=441591"},"modified":"2021-04-14T06:13:46","modified_gmt":"2021-04-13T22:13:46","slug":"%e9%97%ae%e4%b8%80%e4%b8%aa-ts-%e7%b1%bb%e5%9e%8b%e6%8f%90%e5%8f%96%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=441591","title":{"rendered":"\u95ee\u4e00\u4e2a ts \u7c7b\u578b\u63d0\u53d6\u95ee\u9898"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u95ee\u4e00\u4e2a ts \u7c7b\u578b\u63d0\u53d6\u95ee\u9898               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : emilll <\/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<pre><code>interface Article {   filename: string   title: string   date: string }  const articles: Article[] = [   {     filename: 'article1',     title: 'first article',     date: '2021-04-13T18:10:40.578Z'   },   {     filename: 'article2',     title: 'second article',     date: '2021-04-13T19:32:39.556Z'   } ]  \/\/ \u4ece articles \u7684 filename \u5b57\u6bb5\u63d0\u53d6\u7c7b\u578b \/\/ \u7ed3\u679c =&gt; type ArticleFilename = 'article1' | 'article2' type ArticleFilename = ??? <\/code><\/pre>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>5<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"5755242\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : codehz <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             https:\/\/www.typescriptlang.org\/play?#code\/MYewdgzgLgBAhgJygS2AGwKYRgXhgbQCgYYBvYkmAM2UzDgFsMAuGAckRXQwEY2AaCiRRRMrNjQTR4SVJgFCYAEzhQW7AEwAGDTwC0WgCx6eAZgAqPABzMeW5oa0A6AKwB2KwC02FAL6CSckpqWgx6JnFOOQwNBWCRMXYIDFAwJRkueQDKFTVxbV0DYzNLAE5mUw0K0tcXADZvP0IAXXhsVOgAbkJCKABPAAcMGABBWW4AMVDw4dwYAAp+oZAqDOiIAEp8MABXBgAjDARm-AAiGjpGDFPm7sIO2DhWMcyMKcumOdOo7h5T7oeMH2z3GmHeYSuXzgECU-yAA<\/p>\n<p>\u8fd9\u6837\u5e94\u8be5\u5c31\u597d\u4e86                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5755243\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : emilll <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @codehz \u54c7\uff0c\u8c22\u8c22\u5927\u4f6c                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5755244\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : orzfly <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u57fa\u4e8e\u4e0a\uff0c\u5982\u679c\u8fd8\u8981\u9650\u5236 articles \u672c\u8eab\u7684\u683c\u5f0f\uff0c\u6211\u77e5\u9053\u4e00\u4e2a\u8fd9\u6837\u7684\u65b9\u6cd5\uff1a<\/p>\n<p>https:\/\/www.typescriptlang.org\/play?#code\/GYVwdgxgLglg9mABAQwM4BUA86B8AKASkQG8AoRRAJwFMoRKk8ZEBeHRGItRbdRagB5RqYACapEuJgC5J6ImzmkAvqVIwwwysGQRqiAIKVYEADb6yFYDHNhkAW2qzUUShoDm5RLCjnnrjy9RZGF-NzBPVVIIBBcUYxgzagkWFAxMGmRRBFMAT0MEpIBtAF18Ajwir0sKRGtbBydEAHJkQvMARmaAGi8KHz8W60o4tpNzHr7EYNCWgCYABjmOgFoFgBYVjoBmdA6ADmkOhel1hYA6AFYAdn2ALWavZV6KGqsbEUbZVvbqOcnat4YL4ms1UNQYmJ4uNqADajNQYtlmtNjs9gBOaTbOZY9FXS4ANgeT1IJTSiEhLgIAG41FBcgAHfRGGEAMQ+dkcFFSeHpTLgwGhiXMqAIRTAIHsACNqJQSkUAET1T6OBUlWnRWJQFCyFnC6jshpc1IKsb6joK2mU7VS3W-Q0q-QmtCiS1AA<\/p>\n<p>\u4e0d\u77e5\u9053\u6709\u6ca1\u6709\u66f4\u597d\u7684\u529e\u6cd5\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5755245\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : emilll <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @orzfly \u8fd9\u4e2a\u601d\u8def\u53ef\u4ee5\u554a\uff0c\u7528\u51fd\u6570\u505a\u4ee3\u7406\u63d0\u53d6\u7c7b\u578b\u3002\u4ece\u7ed3\u679c\u6765\u770b\u5f88\u5b8c\u7f8e\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5755246\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ryougifujino <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5b66\u4e60\u4e86\uff0c\u4e00\u5f00\u59cb\u8fd8\u4ee5\u4e3a\u4e0d\u884c\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u95ee\u4e00\u4e2a ts \u7c7b\u578b\u63d0\u53d6\u95ee\u9898 \u8cc7\u6df1\u5927&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\/441591"}],"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=441591"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/441591\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=441591"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=441591"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=441591"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}