{"id":196,"date":"2026-09-06T00:40:51","date_gmt":"2026-09-05T16:40:51","guid":{"rendered":"https:\/\/www.ziliaochi.cn\/index.php\/2026\/09\/06\/typescript-7-native-compiler\/"},"modified":"2026-09-06T00:40:51","modified_gmt":"2026-09-05T16:40:51","slug":"typescript-7-native-compiler","status":"publish","type":"post","link":"https:\/\/www.ziliaochi.cn\/index.php\/2026\/09\/06\/typescript-7-native-compiler\/","title":{"rendered":"TypeScript 7 \u539f\u751f\u7f16\u8bd1\u5668\uff1a\u4e00\u6b21\u7f16\u8bd1\u901f\u5ea6\u7684\u91cf\u7ea7\u63d0\u5347\uff0c\u4e0e\u5fc5\u987b\u5904\u7406\u7684\u8fc1\u79fb\u6e05\u5355"},"content":{"rendered":"<div style=\"font-family:-apple-system,BlinkMacSystemFont,\"Segoe UI\",\"PingFang SC\",\"Hiragino Sans GB\",\"Microsoft YaHei\",sans-serif;font-size:16.5px;line-height:1.9;color:#35435c;letter-spacing:.2px\">\n<div style=\"background:linear-gradient(135deg,#f5f9ff,#eef5ff);border:1px solid #dce8f8;border-left:4px solid #2fa37a;border-radius:12px;padding:16px 20px;margin:0 0 24px;font-size:14.5px;color:#3d5570;line-height:2\"><span style=\"display:inline-block;background:#2fa37a;color:#fff;font-size:12.5px;font-weight:700;padding:3px 10px;border-radius:6px;margin-right:12px;letter-spacing:1px;vertical-align:1px\">\u5173\u952e\u8bcd<\/span>TypeScript 7\u3001\u539f\u751f\u7f16\u8bd1\u5668\u3001\u7c7b\u578b\u68c0\u67e5\u3001\u6784\u5efa\u63d0\u901f\u3001\u8fc1\u79fb\u3001\u524d\u7aef\u5de5\u7a0b\u5316<\/div>\n<div style=\"background:#fafbfd;border:1px solid #e8edf5;border-radius:12px;padding:18px 22px;margin:0 0 30px\">\n<div style=\"font-size:13.5px;font-weight:700;color:#8a99ae;letter-spacing:2px;margin-bottom:12px\">\u76ee\u5f55<\/div>\n<ol style=\"margin:0;padding-left:20px\">\n<li style=\"margin:8px 0;font-size:15px;line-height:1.6\"><a href=\"#sec-1\" style=\"color:#42546e;text-decoration:none;border:none\">\u4e00\u3001\u7248\u672c\u5750\u6807<\/a><\/li>\n<li style=\"margin:8px 0;font-size:15px;line-height:1.6\"><a href=\"#sec-2\" style=\"color:#42546e;text-decoration:none;border:none\">\u4e8c\u3001TS 7 \u5230\u5e95\u6362\u4e86\u4ec0\u4e48<\/a><\/li>\n<li style=\"margin:8px 0;font-size:15px;line-height:1.6\"><a href=\"#sec-3\" style=\"color:#42546e;text-decoration:none;border:none\">\u4e09\u3001\u8bed\u8a00\u5c42\u9762\uff1a\u54ea\u4e9b\u5199\u6cd5\u8981\u6539<\/a><\/li>\n<li style=\"margin:8px 0;font-size:15px;line-height:1.6\"><a href=\"#sec-4\" style=\"color:#42546e;text-decoration:none;border:none\">\u56db\u3001\u8fc1\u79fb\u6e05\u5355\uff1a\u56db\u6b65\u8d70<\/a><\/li>\n<li style=\"margin:8px 0;font-size:15px;line-height:1.6\"><a href=\"#sec-5\" style=\"color:#42546e;text-decoration:none;border:none\">\u4e94\u3001\u4ec0\u4e48\u65f6\u5019\u4e0d\u8be5\u6025\u7740\u5347<\/a><\/li>\n<li style=\"margin:8px 0;font-size:15px;line-height:1.6\"><a href=\"#sec-6\" style=\"color:#42546e;text-decoration:none;border:none\">\u516d\u3001\u5c0f\u7ed3<\/a><\/li>\n<\/ol>\n<\/div>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\"><span style=\"font-size:17px;color:#1e2f47\">TypeScript 7 \u662f\u8fd9\u95e8\u8bed\u8a00\u5341\u5e74\u6765\u6700\u5927\u7684\u4e00\u6b21\u5e95\u5c42\u53d8\u66f4\uff1a<strong style=\"color:#0f1c2e;font-weight:600\">\u7f16\u8bd1\u5668\u4ece JavaScript \u5b9e\u73b0\u6362\u6210\u4e86 Go \u5b9e\u73b0\u7684\u539f\u751f\u4e8c\u8fdb\u5236<\/strong>\u3002\u5e26\u6765\u7684\u76f4\u63a5\u7ed3\u679c\u662f\u7c7b\u578b\u68c0\u67e5\u4e0e\u7f16\u8bd1\u901f\u5ea6\u7684\u91cf\u7ea7\u63d0\u5347\uff0c\u4ee5\u53ca\u5927\u578b\u5355\u4f53\u4ed3\u5e93\u7ec8\u4e8e\u80fd\u5403\u5230\u7684&#8221;\u79d2\u7ea7\u5168\u91cf\u68c0\u67e5&#8221;\u3002<\/p>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u4f46\u7248\u672c\u53f7\u8df3\u8dc3\u4e5f\u610f\u5473\u7740\u8fc1\u79fb\u6210\u672c\u3002\u672c\u6587\u8bb2\u6e05 TS 7 \u5230\u5e95\u6539\u4e86\u4ec0\u4e48\u3001\u54ea\u4e9b\u5199\u6cd5\u4f1a\u88ab\u6321\u4f4f\u3001\u4ee5\u53ca\u4e00\u4efd\u53ef\u7167\u6284\u7684\u6e10\u8fdb\u8fc1\u79fb\u6e05\u5355\u3002<\/p>\n<h2 style=\"font-size:23px;line-height:1.45;font-weight:700;color:#0f1c2e;margin:46px 0 18px;padding:0 0 12px 14px;border-left:5px solid #2fa37a;border-bottom:1px solid #eef2f7;letter-spacing:.3px\" id=\"sec-1\">\u4e00\u3001\u7248\u672c\u5750\u6807<\/h2>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u622a\u81f3 2026 \u5e74 9 \u6708\uff0c<code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">typescript<\/code> \u7684 npm dist-tags \u5927\u81f4\u662f\u8fd9\u6837\u7684\u72b6\u6001\uff1a<code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">latest<\/code> \u4e3a <strong style=\"color:#0f1c2e;font-weight:600\">7.0.2<\/strong>\uff0c<code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">rc<\/code> \u901a\u9053\u4e3a 7.0.1-rc\uff0c<code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">next<\/code> \u901a\u9053\u6307\u5411 7.1.0-dev\uff0c\u800c <code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">beta<\/code> \u901a\u9053\u4e0a\u8fd8\u7559\u7740 <strong style=\"color:#0f1c2e;font-weight:600\">6.0.0-beta<\/strong>\u3002\u7248\u672c\u53f7\u53ef\u4ee5\u5728 <a href=\"https:\/\/www.npmjs.com\/package\/typescript\" target=\"_blank\" rel=\"noopener\" style=\"color:#2fa37a;text-decoration:none;border-bottom:1px solid #2fa37a66;transition:opacity .15s\">npm \u4e0a\u7684 typescript \u5305\u9875\u9762<\/a>\u968f\u65f6\u6838\u5bf9\u3002<\/p>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u8fd9\u91cc\u6709\u4e2a\u5bb9\u6613\u6df7\u6dc6\u7684\u70b9\u9700\u8981\u8bb2\u660e\u767d\uff1a<strong style=\"color:#0f1c2e;font-weight:600\">6.x \u548c 7.x \u4e0d\u662f\u7b80\u5355\u7684\u5148\u540e\u5173\u7cfb\uff0c\u800c\u662f&#8221;\u4e24\u6761\u7ebf&#8221;<\/strong>\u30026.x \u5ef6\u7eed\u539f\u6709\u7684 JavaScript \u7f16\u8bd1\u5668\u5b9e\u73b0\uff0c\u4e3b\u8981\u627f\u62c5\u517c\u5bb9\u4e0e\u8fc7\u6e21\u804c\u8d23\uff1b7.x \u5219\u662f\u5168\u65b0\u7684\u539f\u751f\u5b9e\u73b0\uff0c\u662f\u672a\u6765\u7684\u4e3b\u7ebf\u3002\u9009\u9519\u5206\u652f\u4f1a\u5728\u5347\u7ea7\u65f6\u767d\u8dd1\u4e00\u8d9f\u3002<\/p>\n<h2 style=\"font-size:23px;line-height:1.45;font-weight:700;color:#0f1c2e;margin:46px 0 18px;padding:0 0 12px 14px;border-left:5px solid #2fa37a;border-bottom:1px solid #eef2f7;letter-spacing:.3px\" id=\"sec-2\">\u4e8c\u3001TS 7 \u5230\u5e95\u6362\u4e86\u4ec0\u4e48<\/h2>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u4e00\u53e5\u8bdd\uff1a<strong style=\"color:#0f1c2e;font-weight:600\">\u7f16\u8bd1\u5668\u672c\u4f53\u88ab\u91cd\u5199\u4e86\uff0c\u8bed\u8a00\u672c\u8eab\u57fa\u672c\u6ca1\u53d8<\/strong>\u3002<\/p>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">TypeScript \u56e2\u961f\u957f\u671f\u9762\u4e34\u7684\u4e00\u4e2a\u7ed3\u6784\u6027\u95ee\u9898\u662f\uff0c\u7528 JavaScript \u5199\u7684\u7f16\u8bd1\u5668\u5728\u8d85\u5927\u4ed3\u5e93\u4e0a\u505a\u5168\u91cf\u68c0\u67e5\u65f6\uff0c\u5355\u7ebf\u7a0b\u6027\u80fd\u548c\u5185\u5b58\u5360\u7528\u90fd\u5230\u4e86\u74f6\u9888\u3002\u9879\u76ee\u8d8a\u5927\uff0c<code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">tsc --noEmit<\/code> \u8d8a\u6162\uff0cIDE \u91cc\u7684\u7c7b\u578b\u63d0\u793a\u5c31\u8d8a\u8fdf\u949d\u3002\u539f\u751f\u5b9e\u73b0\u7684\u76ee\u6807\u5c31\u662f\u628a\u8fd9\u5c42\u5929\u82b1\u677f\u6380\u6389\u3002<\/p>\n<figure style=\"margin:30px 0;text-align:center\"><img loading=\"lazy\" decoding=\"async\" width=\"1200\" height=\"900\" src=\"https:\/\/www.ziliaochi.cn\/wp-content\/uploads\/2026\/09\/typescript-7-native-compiler-fig.png\" alt=\"TypeScript 7 \u8fc1\u79fb\u56db\u6b65\" class=\"wp-image-195\" style=\"max-width:100%;height:auto;border-radius:12px;border:1px solid #e6ecf4;box-shadow:0 8px 24px rgba(15,30,60,.07)\" srcset=\"https:\/\/www.ziliaochi.cn\/wp-content\/uploads\/2026\/09\/typescript-7-native-compiler-fig.png 1200w, https:\/\/www.ziliaochi.cn\/wp-content\/uploads\/2026\/09\/typescript-7-native-compiler-fig-300x225.png 300w, https:\/\/www.ziliaochi.cn\/wp-content\/uploads\/2026\/09\/typescript-7-native-compiler-fig-1024x768.png 1024w, https:\/\/www.ziliaochi.cn\/wp-content\/uploads\/2026\/09\/typescript-7-native-compiler-fig-768x576.png 768w, https:\/\/www.ziliaochi.cn\/wp-content\/uploads\/2026\/09\/typescript-7-native-compiler-fig-800x600.png 800w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><figcaption style=\"margin-top:12px;font-size:13.5px;color:#7b8aa0;text-align:center;line-height:1.75\">TypeScript 7 \u8fc1\u79fb\u6e05\u5355\uff1a\u6e05\u96f6\u9519\u8bef \u2192 \u5e76\u884c\u9a8c\u8bc1 \u2192 \u5206\u6279\u89e3\u9501 \u2192 \u9501\u5b9a\u9ed8\u8ba4<\/figcaption><\/figure>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u5bf9\u4f7f\u7528\u8005\u7684\u610f\u4e49\u5f88\u76f4\u63a5\uff1a<strong style=\"color:#0f1c2e;font-weight:600\">\u540c\u6837\u7684\u4ee3\u7801\uff0c\u68c0\u67e5\u66f4\u5feb\u3001\u5185\u5b58\u66f4\u7701\u3001\u7f16\u8f91\u5668\u54cd\u5e94\u66f4\u8ddf\u624b<\/strong>\u3002\u5bf9\u4e8e\u51e0\u4e07\u6587\u4ef6\u7684 Monorepo\uff0c\u5168\u91cf\u68c0\u67e5\u4ece&#8221;\u5206\u949f\u7ea7&#8221;\u538b\u5230&#8221;\u79d2\u7ea7&#8221;\u662f\u5e38\u89c1\u7684\u6570\u91cf\u7ea7\u53d8\u5316\u3002CI \u91cc\u8dd1\u7c7b\u578b\u68c0\u67e5\u7684\u65f6\u95f4\u6210\u672c\u4e0b\u964d\uff0c\u4e5f\u4f1a\u8fde\u5e26\u5f71\u54cd\u6d41\u6c34\u7ebf\u7684\u6392\u961f\u4e0e\u5e76\u53d1\u7b56\u7565\u3002<\/p>\n<h2 style=\"font-size:23px;line-height:1.45;font-weight:700;color:#0f1c2e;margin:46px 0 18px;padding:0 0 12px 14px;border-left:5px solid #2fa37a;border-bottom:1px solid #eef2f7;letter-spacing:.3px\" id=\"sec-3\">\u4e09\u3001\u8bed\u8a00\u5c42\u9762\uff1a\u54ea\u4e9b\u5199\u6cd5\u8981\u6539<\/h2>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u539f\u751f\u5b9e\u73b0\u4e3a\u4e86\u6362\u53d6\u6027\u80fd\uff0c\u6536\u7d27\u4e86\u4e00\u6279\u5386\u53f2\u4e0a&#8221;\u80fd\u8fc7\u4f46\u8bed\u4e49\u6a21\u7cca&#8221;\u7684\u5199\u6cd5\u3002\u8fc1\u79fb\u65f6\u6700\u5148\u5361\u4f4f\u9879\u76ee\u7684\u901a\u5e38\u662f\u4e0b\u9762\u51e0\u7c7b\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #2fa37a40\">1. \u4f9d\u8d56\u672a\u58f0\u660e\u7c7b\u578b\u7684\u9690\u5f0f\u884c\u4e3a<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u8001\u7f16\u8bd1\u5668\u5728\u67d0\u4e9b\u573a\u666f\u4e0b\u4f1a&#8221;\u5bbd\u5bb9\u5730\u653e\u8fc7&#8221;\u7c7b\u578b\u4fe1\u606f\u7f3a\u5931\u7684\u60c5\u51b5\uff0c\u6bd4\u5982\u4ece\u65e0\u7c7b\u578b\u7684 <code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">.js<\/code> \u6587\u4ef6\u91cc\u63a8\u5bfc\u51fa\u7684 <code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">any<\/code> \u518d\u53c2\u4e0e\u8fd0\u7b97\u3002\u539f\u751f\u5b9e\u73b0\u503e\u5411\u4e8e\u66f4\u65e9\u3001\u66f4\u4e25\u683c\u5730\u62a5\u9519\u3002\u8fd9\u7c7b\u95ee\u9898\u7684\u4fee\u6cd5\u5f88\u6734\u7d20\u2014\u2014<strong style=\"color:#0f1c2e;font-weight:600\">\u628a\u9690\u5f0f any \u663e\u5f0f\u5316<\/strong>\uff1a<\/p>\n<pre style=\"background:#0f1a2b;color:#dbe6f5;border-radius:12px;padding:18px 20px;overflow-x:auto;font-size:13.6px;line-height:1.78;margin:22px 0;border:1px solid #1e2c42;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace\"><code style=\"background:none;border:none;color:inherit;padding:0;font-size:inherit;font-family:inherit\">\/\/ \u8fc1\u79fb\u524d\uff1ahandler \u7684\u5165\u53c2\u88ab\u63a8\u5bfc\u4e3a any\uff0c\u9759\u9ed8\u901a\u8fc7\nimport { handler } from '.\/legacy-helper.js'\nhandler(event)\n\n\/\/ \u8fc1\u79fb\u540e\uff1a\u663e\u5f0f\u6807\u6ce8\uff0c\u628a\u4e0d\u786e\u5b9a\u6027\u6446\u5230\u53f0\u9762\u4e0a\nimport { handler } from '.\/legacy-helper.js'\nhandler(event as unknown as AppEvent)\n<\/code><\/pre>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #2fa37a40\">2. \u88c5\u9970\u5668\u4e0e\u5b9e\u9a8c\u6027\u9009\u9879<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u5982\u679c\u4f60\u7684\u9879\u76ee\u91cd\u5ea6\u4f7f\u7528\u88c5\u9970\u5668\uff08\u5c24\u5176\u662f Angular\u3001NestJS \u8fd9\u7c7b\u6846\u67b6\uff09\uff0c\u9700\u8981\u91cd\u70b9\u56de\u5f52\u6d4b\u8bd5\u3002<strong style=\"color:#0f1c2e;font-weight:600\">\u88c5\u9970\u5668\u7684\u5143\u6570\u636e\u53d1\u5c04\u4e0e\u6c42\u503c\u987a\u5e8f<\/strong>\u662f\u539f\u751f\u5b9e\u73b0\u4e2d\u6700\u5bb9\u6613\u4e0e\u65e7\u884c\u4e3a\u4ea7\u751f\u5dee\u5f02\u7684\u5730\u65b9\u3002\u5efa\u8bae\u5728\u8fc1\u79fb\u5206\u652f\u4e0a\u5148\u8dd1\u4e00\u904d\u5b8c\u6574\u7684\u6846\u67b6\u6784\u5efa\u4e0e\u8fd0\u884c\u65f6\u5192\u70df\uff0c\u800c\u4e0d\u662f\u53ea\u770b <code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">tsc<\/code> \u662f\u5426\u62a5\u9519\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #2fa37a40\">3. \u81ea\u5b9a\u4e49 transformer \u4e0e\u7f16\u8bd1\u5668 API<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u8fd9\u662f\u6700\u786c\u7684\u4e00\u5757\u3002\u76f4\u63a5\u4f9d\u8d56 <code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">typescript<\/code> \u5185\u90e8 API \u7684\u5de5\u5177\u94fe\uff08\u8001\u7248\u672c\u7684\u4ee3\u7801\u751f\u6210\u63d2\u4ef6\u3001\u81ea\u5b9a\u4e49 transformer\uff09\u5728\u539f\u751f\u5b9e\u73b0\u4e0b\u5927\u6982\u7387\u5931\u6548\uff0c\u56e0\u4e3a\u5185\u90e8\u6570\u636e\u7ed3\u6784\u4e0d\u518d\u662f\u540c\u4e00\u5957 JavaScript \u5bf9\u8c61\u6811\u3002<\/p>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u6392\u67e5\u987a\u5e8f\u5efa\u8bae\uff1a<\/p>\n<ul style=\"padding-left:26px;margin:16px 0\">\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\">\u5148\u68c0\u67e5 <code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">tsconfig.json<\/code> \u91cc\u6709\u6ca1\u6709\u914d\u7f6e <code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">plugins<\/code>\uff1b<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\">\u518d\u68c0\u67e5\u6784\u5efa\u5de5\u5177\u94fe\u91cc\u662f\u5426\u6709\u4f9d\u8d56 <code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">ts.createProgram<\/code>\u3001<code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">ts.transform<\/code> \u4e4b\u7c7b API \u7684\u811a\u672c\uff1b<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\">\u5bf9\u65e0\u6cd5\u66ff\u6362\u7684\u63d2\u4ef6\uff0c\u8003\u8651\u628a\u5bf9\u5e94\u80fd\u529b\u524d\u79fb\u5230\u6784\u5efa\u9636\u6bb5\uff08\u6bd4\u5982\u7528 Babel\/SWC \u63d2\u4ef6\u6216\u72ec\u7acb\u7684\u4ee3\u7801\u751f\u6210\u811a\u672c\uff09\uff0c\u8ba9\u7c7b\u578b\u68c0\u67e5\u53ea\u505a\u7c7b\u578b\u68c0\u67e5\u3002<\/li>\n<\/ul>\n<h2 style=\"font-size:23px;line-height:1.45;font-weight:700;color:#0f1c2e;margin:46px 0 18px;padding:0 0 12px 14px;border-left:5px solid #2fa37a;border-bottom:1px solid #eef2f7;letter-spacing:.3px\" id=\"sec-4\">\u56db\u3001\u8fc1\u79fb\u6e05\u5355\uff1a\u56db\u6b65\u8d70<\/h2>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u4e0d\u8981\u4e00\u6b21\u6027\u5207\u4e3b\u5206\u652f\u3002\u63a8\u8350\u6309\u4e0b\u9762\u7684\u987a\u5e8f\u63a8\u8fdb\uff0c\u6bcf\u4e00\u6b65\u90fd\u80fd\u72ec\u7acb\u56de\u9000\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #2fa37a40\">\u7b2c 1 \u6b65\uff1a\u5148\u628a\u7c7b\u578b\u9519\u8bef\u6e05\u96f6<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u5728\u65e7\u7248\u672c\u4e0a\u628a <code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">strict<\/code> \u4e0b\u7684\u7c7b\u578b\u9519\u8bef\u5168\u90e8\u4fee\u5b8c\uff0c\u5e76\u8ba9 CI \u5f3a\u5236\u62e6\u622a\u3002\u5e26\u7740\u4e00\u5806\u65e2\u6709\u9519\u8bef\u53bb\u8fc1\u65b0\u7248\uff0c\u4f1a\u5206\u4e0d\u6e05\u54ea\u4e9b\u662f\u65b0\u7248\u5f15\u5165\u7684\u3002<\/p>\n<pre style=\"background:#0f1a2b;color:#dbe6f5;border-radius:12px;padding:18px 20px;overflow-x:auto;font-size:13.6px;line-height:1.78;margin:22px 0;border:1px solid #1e2c42;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace\"><code style=\"background:none;border:none;color:inherit;padding:0;font-size:inherit;font-family:inherit\"># \u5148\u5728\u5f53\u524d\u7248\u672c\u4e0a\u786e\u8ba4\u57fa\u7ebf\nnpx tsc --noEmit\n<\/code><\/pre>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #2fa37a40\">\u7b2c 2 \u6b65\uff1a\u7528\u72ec\u7acb\u5206\u652f\u5e76\u884c\u8dd1<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u5728 CI \u91cc\u65b0\u589e\u4e00\u4e2a&#8221;\u5b9e\u9a8c\u6027&#8221;\u4efb\u52a1\uff0c\u7528 TS 7 \u8dd1\u4e00\u904d\u7c7b\u578b\u68c0\u67e5\uff0c<strong style=\"color:#0f1c2e;font-weight:600\">\u5141\u8bb8\u5931\u8d25\u4f46\u4ea7\u51fa\u62a5\u544a<\/strong>\u3002\u8fd9\u4e00\u6b65\u4e0d\u963b\u585e\u5408\u5165\uff0c\u53ea\u662f\u6301\u7eed\u6536\u96c6\u5dee\u5f02\u3002<\/p>\n<pre style=\"background:#0f1a2b;color:#dbe6f5;border-radius:12px;padding:18px 20px;overflow-x:auto;font-size:13.6px;line-height:1.78;margin:22px 0;border:1px solid #1e2c42;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace\"><code style=\"background:none;border:none;color:inherit;padding:0;font-size:inherit;font-family:inherit\"># CI \u4e2d\u7684\u5e76\u884c\u68c0\u67e5\u4efb\u52a1\uff08\u793a\u4f8b\uff09\n- name: Type check (TS 7 preview)\n  run: npx tsc --noEmit\n  continue-on-error: true\n<\/code><\/pre>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #2fa37a40\">\u7b2c 3 \u6b65\uff1a\u6309\u76ee\u5f55\u5206\u6279\u89e3\u9501<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u628a\u7b2c 2 \u6b65\u6536\u96c6\u5230\u7684\u9519\u8bef\u6309\u76ee\u5f55\u5f52\u7c7b\uff0c\u4ece&#8221;\u53f6\u5b50\u6a21\u5757&#8221;\uff08\u4f9d\u8d56\u6700\u5c11\u7684\u5de5\u5177\u5c42\u3001\u7c7b\u578b\u5b9a\u4e49\u5c42\uff09\u5f00\u59cb\u4fee\uff0c\u9010\u6b65\u5411\u4e1a\u52a1\u5c42\u63a8\u8fdb\u3002\u8fd9\u6837\u6bcf\u4fee\u4e00\u6279\u90fd\u80fd\u7acb\u523b\u770b\u5230\u9519\u8bef\u603b\u6570\u4e0b\u964d\uff0c\u8fdb\u5ea6\u53ef\u63a7\u3002<\/p>\n<h3 style=\"font-size:18.5px;line-height:1.55;font-weight:700;color:#18283e;margin:30px 0 12px;padding-left:12px;border-left:3px solid #2fa37a40\">\u7b2c 4 \u6b65\uff1a\u5207\u6362\u9ed8\u8ba4\u7248\u672c\u5e76\u9501\u5b9a<\/h3>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u5168\u90e8\u7eff\u706f\u540e\uff0c\u628a <code style=\"background:#eef4fb;color:#0b6bcb;padding:2px 7px;border-radius:5px;font-size:14px;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace;border:1px solid #dce8f6;white-space:nowrap\">typescript<\/code> \u4f9d\u8d56\u5207\u5230 7.x \u5e76\u9501\u5b9a\u6b21\u7248\u672c\uff0c\u540c\u65f6\u66f4\u65b0\u7f16\u8f91\u5668\u4f7f\u7528\u7684 TS \u7248\u672c\uff08VS Code \u9700\u8981\u5728\u5de5\u4f5c\u533a\u91cc\u663e\u5f0f\u6307\u5b9a\uff0c\u5426\u5219\u53ef\u80fd\u4ecd\u5728\u7528\u5185\u7f6e\u7248\u672c\uff09\u3002<\/p>\n<pre style=\"background:#0f1a2b;color:#dbe6f5;border-radius:12px;padding:18px 20px;overflow-x:auto;font-size:13.6px;line-height:1.78;margin:22px 0;border:1px solid #1e2c42;font-family:\"JetBrains Mono\",Consolas,Monaco,\"Courier New\",monospace\"><code style=\"background:none;border:none;color:inherit;padding:0;font-size:inherit;font-family:inherit\">\/\/ .vscode\/settings.json\n{\n  \"typescript.tsdk\": \"node_modules\/typescript\/lib\"\n}\n<\/code><\/pre>\n<h2 style=\"font-size:23px;line-height:1.45;font-weight:700;color:#0f1c2e;margin:46px 0 18px;padding:0 0 12px 14px;border-left:5px solid #2fa37a;border-bottom:1px solid #eef2f7;letter-spacing:.3px\" id=\"sec-5\">\u4e94\u3001\u4ec0\u4e48\u65f6\u5019\u4e0d\u8be5\u6025\u7740\u5347<\/h2>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u8bf4\u4e86\u8fd9\u4e48\u591a\u597d\u5904\uff0c\u4e5f\u5f97\u8bb2\u6e05\u8fb9\u754c\u3002\u4e0b\u9762\u4e09\u79cd\u60c5\u51b5\uff0c<strong style=\"color:#0f1c2e;font-weight:600\">\u5efa\u8bae\u518d\u7b49\u4e00\u4e24\u4e2a\u5c0f\u7248\u672c<\/strong>\uff1a<\/p>\n<ul style=\"padding-left:26px;margin:16px 0\">\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">\u5f3a\u4f9d\u8d56\u5185\u90e8\u7f16\u8bd1\u5668 API \u7684\u81ea\u7814\u5de5\u5177\u94fe<\/strong>\uff1a\u66ff\u4ee3\u65b9\u6848\u6ca1\u843d\u5730\u4e4b\u524d\uff0c\u5347\u7ea7\u7b49\u4e8e\u81ea\u65ad\u4e00\u81c2\uff1b<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">\u5904\u4e8e\u53d1\u5e03\u51bb\u7ed3\u671f\u7684\u9879\u76ee<\/strong>\uff1a\u7c7b\u578b\u68c0\u67e5\u884c\u4e3a\u53d8\u5316\u53ef\u80fd\u7275\u51fa\u8fd0\u884c\u65f6\u95ee\u9898\uff0c\u4e0d\u503c\u5f97\u5728\u51bb\u7ed3\u671f\u5192\u9669\uff1b<\/li>\n<li style=\"font-size:16.2px;line-height:1.92;color:#35435c;margin:10px 0;letter-spacing:.2px\"><strong style=\"color:#0f1c2e;font-weight:600\">\u88c5\u9970\u5668\u91cd\u5ea6\u4f7f\u7528\u4e14\u7f3a\u5c11\u56de\u5f52\u6d4b\u8bd5<\/strong>\uff1a\u6ca1\u6709\u6d4b\u8bd5\u515c\u5e95\uff0c\u5dee\u5f02\u5f88\u96be\u88ab\u53ca\u65f6\u53d1\u73b0\u3002<\/li>\n<\/ul>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u53cd\u8fc7\u6765\u8bf4\uff0c<strong style=\"color:#0f1c2e;font-weight:600\">\u7eaf\u4e1a\u52a1\u4ee3\u7801\u3001\u6d4b\u8bd5\u8986\u76d6\u5c1a\u53ef\u3001CI \u6709\u7c7b\u578b\u68c0\u67e5\u5173\u5361<\/strong>\u7684\u9879\u76ee\uff0c\u5347\u7ea7\u6536\u76ca\u660e\u663e\u5927\u4e8e\u98ce\u9669\uff0c\u53ef\u4ee5\u6392\u4e0a\u65e5\u7a0b\u3002<\/p>\n<h2 style=\"font-size:23px;line-height:1.45;font-weight:700;color:#0f1c2e;margin:46px 0 18px;padding:0 0 12px 14px;border-left:5px solid #2fa37a;border-bottom:1px solid #eef2f7;letter-spacing:.3px\" id=\"sec-6\">\u516d\u3001\u5c0f\u7ed3<\/h2>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">TypeScript 7 \u7684\u4ef7\u503c\u4e0d\u5728\u65b0\u8bed\u6cd5\u7cd6\uff0c\u800c\u5728<strong style=\"color:#0f1c2e;font-weight:600\">\u628a\u7c7b\u578b\u68c0\u67e5\u4ece&#8221;\u4e0d\u5f97\u4e0d\u5fcd\u53d7\u7684\u7b49\u5f85&#8221;\u53d8\u6210&#8221;\u968f\u624b\u53ef\u8dd1\u7684\u5373\u65f6\u53cd\u9988&#8221;<\/strong>\u3002\u771f\u6b63\u7684\u5de5\u4f5c\u91cf\u4e0d\u5728\u6539\u4ee3\u7801\uff0c\u800c\u5728\u6392\u67e5\u5de5\u5177\u94fe\u4f9d\u8d56\u2014\u2014\u5c24\u5176\u90a3\u4e9b\u6084\u6084\u7528\u4e86\u7f16\u8bd1\u5668\u5185\u90e8 API \u7684\u63d2\u4ef6\u3002<\/p>\n<p style=\"font-size:16.2px;line-height:1.95;color:#35435c;margin:16px 0;letter-spacing:.2px\">\u8fc1\u79fb\u7684\u6b63\u786e\u59ff\u52bf\u662f\u5e76\u884c\u8dd1\u3001\u5206\u6279\u4fee\u3001\u53ef\u56de\u9000\uff0c\u800c\u4e0d\u662f\u6311\u4e2a\u5468\u672b\u4e00\u628a\u68ad\u3002<\/p>\n<div style=\"margin:42px 0 0;padding:22px 0 0;border-top:1px solid #eaeef4\">\n<div style=\"font-size:13px;color:#93a1b5;letter-spacing:1px;margin-bottom:12px\">\u6807\u7b7e<\/div>\n<p><span style=\"display:inline-block;background:#f3f6fa;border:1px solid #e4eaf2;color:#5b6c85;font-size:13px;padding:5px 12px;border-radius:999px;margin:0 8px 8px 0\">#TypeScript<\/span><span style=\"display:inline-block;background:#f3f6fa;border:1px solid #e4eaf2;color:#5b6c85;font-size:13px;padding:5px 12px;border-radius:999px;margin:0 8px 8px 0\">#\u524d\u7aef\u5de5\u7a0b\u5316<\/span><span style=\"display:inline-block;background:#f3f6fa;border:1px solid #e4eaf2;color:#5b6c85;font-size:13px;padding:5px 12px;border-radius:999px;margin:0 8px 8px 0\">#\u7f16\u8bd1\u5668<\/span><span style=\"display:inline-block;background:#f3f6fa;border:1px solid #e4eaf2;color:#5b6c85;font-size:13px;padding:5px 12px;border-radius:999px;margin:0 8px 8px 0\">#\u524d\u7aef<\/span><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>TypeScript 7 \u628a\u7f16\u8bd1\u5668\u4ece JavaScript \u5b9e\u73b0\u6362\u6210\u4e86 Go \u539f\u751f\u4e8c\u8fdb\u5236\uff0c\u7c7b\u578b\u68c0\u67e5\u4e0e\u7f16\u8bd1\u901f\u5ea6\u63d0\u5347\u4e00\u4e2a\u91cf\u7ea7\uff0c\u5927\u578b\u5355\u4f53\u4ed3\u5e93\u7ec8\u4e8e\u80fd\u5403\u5230\u7684\u79d2\u7ea7\u5168\u91cf\u68c0\u67e5\u3002\u672c\u6587\u8bb2\u6e05\u5b83\u5230\u5e95\u6539\u4e86\u4ec0\u4e48\u3001\u54ea\u4e9b\u5199\u6cd5\u5fc5\u987b\u6539\uff0c\u5e76\u7ed9\u51fa\u4e00\u4efd\u56db\u6b65\u8fc1\u79fb\u6e05\u5355\u4e0e\u6682\u7f13\u5347\u7ea7\u7684\u5224\u65ad\u6807\u51c6\u3002<\/p>\n","protected":false},"author":1,"featured_media":194,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,1],"tags":[84,85,28,27],"class_list":["post-196","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-frontend","category-technical","tag-typescript","tag-85","tag-28","tag-27"],"_links":{"self":[{"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/posts\/196","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/comments?post=196"}],"version-history":[{"count":0,"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/posts\/196\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/media\/194"}],"wp:attachment":[{"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/media?parent=196"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/categories?post=196"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ziliaochi.cn\/index.php\/wp-json\/wp\/v2\/tags?post=196"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}