{"id":3111,"date":"2024-11-10T10:31:54","date_gmt":"2024-11-10T02:31:54","guid":{"rendered":"https:\/\/fwq.ai\/blog\/3111\/"},"modified":"2024-11-10T10:31:54","modified_gmt":"2024-11-10T02:31:54","slug":"%e6%80%8e%e4%b9%88%e6%9f%a5typescript%e7%89%88%e6%9c%ac%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/3111\/","title":{"rendered":"\u600e\u4e48\u67e5typescript\u7248\u672c\u6559\u7a0b"},"content":{"rendered":"<blockquote><p>\n  \u6709\u56db\u79cd\u67e5\u770b typescript \u7248\u672c\u7684\u65b9\u6cd5\uff1a\u8fd0\u884c\u547d\u4ee4\u884c\u547d\u4ee4 tsc -v\u4f7f\u7528 typescript ide \u4e2d\u7684\u201c\u5173\u4e8e\u201d\u9009\u9879\u67e5\u770b package.json \u6587\u4ef6\u4f7f\u7528 npm \u547d\u4ee4 npm list typescript -g &#8211;depth=0 \u67e5\u770b\u5168\u5c40\u5b89\u88c5\u7248\u672c\n<\/p><\/blockquote>\n<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/202411\/08\/2024110801331450839.jpg\" class=\"aligncenter\" title=\"\u600e\u4e48\u67e5typescript\u7248\u672c\u6559\u7a0b\u63d2\u56fe\" alt=\"\u600e\u4e48\u67e5typescript\u7248\u672c\u6559\u7a0b\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u67e5\u770b TypeScript \u7248\u672c<\/strong><\/p>\n<p><strong>\u65b9\u6cd5\u4e00\uff1a\u4f7f\u7528\u547d\u4ee4\u884c<\/strong><\/p>\n<p>\u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a<\/p>\n<pre>tsc -v<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u8fd9\u5c06\u8f93\u51fa\u5df2\u5b89\u88c5\u7684 TypeScript \u7f16\u8bd1\u5668\u7684\u7248\u672c\u3002<\/p>\n<p><strong>\u65b9\u6cd5\u4e8c\uff1a\u4f7f\u7528 TypeScript IDE<\/strong><\/p>\n<p>\u5982\u679c\u60a8\u4f7f\u7528\u7684\u662f\u5e26 TypeScript IDE \u7684\u4ee3\u7801\u7f16\u8f91\u5668\uff0c\u60a8\u53ef\u4ee5\u5728\u7f16\u8f91\u5668\u4e2d\u67e5\u770b\u7248\u672c\u4fe1\u606f\u3002\u5728 Visual Studio Code \u4e2d\uff0c\u8bf7\u8f6c\u5230\u201c\u5e2e\u52a9\u201d&gt;\u201c\u5173\u4e8e\u201d\uff0c\u7136\u540e\u9009\u62e9\u201cTypeScript \u7248\u672c\u201d\u3002<\/p>\n<p><strong>\u65b9\u6cd5\u4e09\uff1a\u67e5\u770b package.json \u6587\u4ef6<\/strong><\/p>\n<p>\u5982\u679c\u60a8\u4f7f\u7528 TypeScript \u4f5c\u4e3a\u9879\u76ee\u4f9d\u8d56\u9879\uff0c\u53ef\u4ee5\u67e5\u770b\u9879\u76ee\u76ee\u5f55\u4e2d\u7684 package.json \u6587\u4ef6\u3002\u5b83\u5c06\u5305\u542b\u5df2\u5b89\u88c5\u7684 TypeScript \u7248\u672c\u3002<\/p>\n<p><strong>\u65b9\u6cd5\u56db\uff1a\u4f7f\u7528 npm<\/strong><\/p>\n<p>\u5982\u679c\u60a8\u4f7f\u7528 npm \u7ba1\u7406 TypeScript\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u67e5\u770b\u7248\u672c\uff1a<\/p>\n<pre>npm list typescript -g --depth=0<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u8fd9\u5c06\u8f93\u51fa\u5168\u5c40\u5b89\u88c5\u7684 TypeScript \u7248\u672c\u3002<\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u600e\u4e48\u67e5\u7248\u672c\u6559\u7a0b\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6709\u56db\u79cd\u67e5\u770b typescript \u7248\u672c\u7684\u65b9\u6cd5\uff1a\u8fd0\u884c\u547d\u4ee4\u884c\u547d\u4ee4 tsc -v\u4f7f\u7528 typescript ide \u4e2d\u7684\u201c\u5173\u4e8e\u201d\u9009\u9879\u67e5\u770b package.json \u6587\u4ef6\u4f7f\u7528 npm \u547d\u4ee4 npm list typescript -g &#8211;depth=0 \u67e5\u770b\u5168\u5c40\u5b89\u88c5\u7248\u672c \u5982\u4f55\u67e5\u770b TypeScript \u7248\u672c \u65b9\u6cd5\u4e00\uff1a\u4f7f\u7528\u547d\u4ee4\u884c \u5728\u547d\u4ee4\u884c\u4e2d\u8f93\u5165\u4ee5\u4e0b\u547d\u4ee4\uff1a tsc -v \u767b\u5f55\u540e\u590d\u5236 \u8fd9\u5c06\u8f93\u51fa\u5df2\u5b89\u88c5\u7684 TypeScript \u7f16\u8bd1\u5668\u7684\u7248\u672c\u3002 \u65b9\u6cd5\u4e8c\uff1a\u4f7f\u7528 TypeScript IDE \u5982\u679c\u60a8\u4f7f\u7528\u7684\u662f\u5e26 TypeScript IDE \u7684\u4ee3\u7801\u7f16\u8f91\u5668\uff0c\u60a8\u53ef\u4ee5\u5728\u7f16\u8f91\u5668\u4e2d\u67e5\u770b\u7248\u672c\u4fe1\u606f\u3002\u5728 Visual Studio Code \u4e2d\uff0c\u8bf7\u8f6c\u5230\u201c\u5e2e\u52a9\u201d&gt;\u201c\u5173\u4e8e\u201d\uff0c\u7136\u540e\u9009\u62e9\u201cTypeScript \u7248\u672c\u201d\u3002 \u65b9\u6cd5\u4e09\uff1a\u67e5\u770b package.json \u6587\u4ef6 \u5982\u679c\u60a8\u4f7f\u7528 TypeScript \u4f5c\u4e3a\u9879\u76ee\u4f9d\u8d56\u9879\uff0c\u53ef\u4ee5\u67e5\u770b\u9879\u76ee\u76ee\u5f55\u4e2d\u7684 package.json \u6587\u4ef6\u3002\u5b83\u5c06\u5305\u542b\u5df2\u5b89\u88c5\u7684 TypeScript \u7248\u672c\u3002 \u65b9\u6cd5\u56db\uff1a\u4f7f\u7528 npm \u5982\u679c\u60a8\u4f7f\u7528 npm [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-3111","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/3111","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=3111"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/3111\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=3111"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=3111"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=3111"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}