{"id":33138,"date":"2023-01-01T06:00:34","date_gmt":"2022-12-31T22:00:34","guid":{"rendered":"http:\/\/lrxjmw.cn\/?p=33138"},"modified":"2023-01-01T06:00:39","modified_gmt":"2022-12-31T22:00:39","slug":"javascript-typescript","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/javascript-typescript.html","title":{"rendered":"\u53f7\u5916\uff01\uff01\uff01TypeScrip 2.0 \u7248\u672c \u53d1\u5e03\u4e86"},"content":{"rendered":"
\u5bfc\u8bfb<\/td>\n | TypeScript \u662f\u4e00\u79cd\u57fa\u4e8e JavaScript \u884d\u751f\u7684\u8bed\u8a00\uff0c\u662f\u7531\u5fae\u8f6f\u4e3a\u4e86\u4f7f\u5927\u578b Web \u5e94\u7528\u5f00\u53d1\u66f4\u5bb9\u6613\u800c\u521b\u9020\u7684\u4e00\u79cd\u8bed\u8a00\uff0c\u73b0\u5728\u5df2\u7ecf\u53d1\u5e03\u4e86 2.0 \u91cc\u7a0b\u7891\u7248\u672c\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n \u5728\u7528\u4e8e\u5927\u578b\u5f00\u53d1\u65f6\uff0c JavaScript \u7531\u4e8e\u5176\u56fa\u6709\u7684\u7279\u6027\u800c\u9762\u4e34\u4e00\u4e9b\u6311\u6218\u3002\u5176\u5b83\u7684\u9759\u6001\u7f16\u8bd1\u8bed\u8a00\uff0c\u5982 C#\u3001Java \u548c C++ \u5728\u6bcf\u6b21\u5f00\u53d1\u4eba\u5458\u6572\u4e0b\u201c\u7f16\u8bd1\u201d\u65f6\u4f1a\u8fdb\u884c\u5168\u9762\u7684\u9519\u8bef\u68c0\u67e5\uff0c\u800c JavaScript \u76f4\u5230\u8fd0\u884c\u65f6\u624d\u4f1a\u505a\u9519\u8bef\u68c0\u67e5\u3002\u8fd9\u610f\u5473\u7740\uff0c\u4ece\u8f93\u5165\u9519\u8bef\u5230\u50cf\u5bf9\u975e\u6570\u5b57\u8fdb\u884c\u6570\u5b66\u8fd0\u7b97\u8fd9\u6837\u7684\u9519\u8bef\u7528\u6cd5\u90fd\u6839\u672c\u4e0d\u4f1a\u9047\u5230\u68c0\u67e5\uff0c\u6240\u4ee5\uff0c\u7528\u6237\u4e0d\u8d70\u8fd0\u7684\u8bdd\u5c31\u4f1a\u9047\u5230\u8fd9\u4e9b\u95ee\u9898\u3002\u800c\u5728 TypeScript \u4e2d\uff0c\u5fae\u8f6f\u7684\u76ee\u6807\u662f\u5f15\u5165\u4e00\u4e9b\u5176\u5b83\u8bed\u8a00\u4e5f\u63d0\u4f9b\u7684\u68c0\u67e5\u548c\u6821\u9a8c\uff0c\u800c\u4f9d\u7136\u4fdd\u6301\u548c JavaScript \u7684\u517c\u5bb9\u6027\uff0c\u5e76\u53ef\u4ee5\u7f16\u8bd1\u6210 JavaScript\u3002<\/p>\n \u6839\u636e\u4ecb\u7ecd\uff0cTypeScript 2.0 \u5f15\u5165\u4e86\u4e00\u4e9b\u65b0\u529f\u80fd\uff0c\u6539\u8fdb\u4e86\u6027\u80fd\u3001\u589e\u5f3a\u4e86 JavaScript \u517c\u5bb9\u6027\uff0c\u5e76\u5728 TypeScript \u8fdb\u884c\u7f16\u8bd1\u65f6\u6269\u5927\u4e86\u9519\u8bef\u68c0\u67e5\u7684\u8303\u56f4\u3002TypeScript 2.0 \u4e2d\u7684\u4e00\u5927\u8fdb\u6b65\u5c31\u662f\u7ed9\u4e88\u5f00\u53d1\u4eba\u5458\u5bf9 \"null\" \u503c\u7684\u66f4\u5927\u63a7\u5236\u3002<\/p>\n <\/p>\n \"null\"\u7528\u4e8e\u8868\u793a\u53d8\u91cf\u6839\u672c\u6ca1\u6709\u503c\uff0c\u5b83\u88ab\u5176\u53d1\u660e\u4eba\u620f\u79f0\u4e3a\u201c\u4ef7\u503c\u5341\u4ebf\u7f8e\u5143\u7684\u9519\u8bef\u201d\u3002\u4e00\u6b21\u53c8\u4e00\u6b21\uff0c\u7a0b\u5e8f\u603b\u662f\u7531\u4e8e\u6ca1\u6709\u6b63\u786e\u68c0\u67e5\u4e00\u4e2a\u503c\u662f\u5426\u662f \"null\" \u503c\u800c\u6389\u5230\u5751\u91cc\u3002\u4f46\u662f\u4e0d\u7ba1\u597d\u4e0e\u4e0d\u597d\uff0c\u6240\u6709\u4e3b\u6d41\u7684\u7f16\u7a0b\u8bed\u8a00\u90fd\u652f\u6301\u8fd9\u4e2a \"null\"\u7684\u6982\u5ff5\u3002<\/p>\n TypeScript 2.0 \u5f15\u5165\u4e86\u8bb8\u591a\u65b0\u7684\u7279\u6027\uff0c\u4f46\u662f\u5176\u4e2d\u6700\u5927\u7684\u7279\u6027\u5c31\u662f\u5bf9\"null\" \u503c\u7684\u63a7\u5236\u3002\u5728 TypeScript 2.0 \u4e2d\uff0c\u5f00\u53d1\u4eba\u5458\u53ef\u4ee5\u53ef\u4ee5\u542f\u7528\u4e00\u79cd\u65b0\u7684\u884c\u4e3a\uff0c\u4ee5\u9ed8\u8ba4\u9632\u6b62\u53d8\u91cf\u8d4b\u503c\u4e3a null\u3002\u5f53\u542f\u7528\u8be5\u9009\u9879\u65f6\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u53d8\u91cf\u5fc5\u987b\u6709\u4e00\u4e2a\u503c\uff0c\u4e14\u8fd9\u4e2a\u503c\u4e0d\u80fd\u662f \"null\"\u3002\u8fd9\u53ef\u4ee5\u8ba9\u7f16\u8bd1\u5668\u53d1\u73b0\u53d8\u91cf\u6ca1\u6709\u521d\u59cb\u5316\u7684\u9519\u8bef\u3002<\/p>\n TypeScript \u4f3c\u4e4e\u8d62\u5f97\u4e86\u8bb8\u591a JavaScript \u5f00\u53d1\u8005\u7684\u62e5\u62a4\uff0c\u8c37\u6b4c\u91c7\u7528\u5b83\u6765\u5f00\u53d1 Angular 2 \u6846\u67b6\uff0c\u800c\u00a0Visual Studio\u3001Visual Studio Code\u3001Eclipse\u3001Emacs\u3001Vim \u7b49\u7b49\u5f00\u53d1\u73af\u5883\u4e5f\u90fd\u652f\u6301 TypeScript\u3002\u5fae\u8f6f\u5df2\u7ecf\u628a\u5b83\u4f5c\u4e3a\u793e\u533a\u9a71\u52a8\u7684\u9879\u76ee\u8fdb\u884c\u4e86\u5f00\u6e90\uff0c\u76ee\u524d\u5df2\u7ecf\u6709\u8d85\u8fc7 150 \u4e2a\u72ec\u7acb\u8d21\u732e\u8005\u53c2\u4e0e\u4e86\u8be5\u9879\u76ee\uff0c\u8fd9\u5df2\u7ecf\u662f\u96f7\u8499\u5fb7\u62e5\u62b1\u5f00\u6e90\u7684\u6210\u529f\u5178\u8303\u4e4b\u4e00\u3002<\/p>\n \n |