{"id":15190,"date":"2024-04-01T17:08:49","date_gmt":"2024-04-01T13:38:49","guid":{"rendered":"https:\/\/www.itpiran.net\/blog\/?p=15190"},"modified":"2024-04-01T17:08:49","modified_gmt":"2024-04-01T13:38:49","slug":"typescript-new-projectstep-1-starting-the-typescript-project","status":"publish","type":"post","link":"https:\/\/www.itpiran.net\/blog\/zh\/tutorials\/typescript-new-projectstep-1-starting-the-typescript-project\/","title":{"rendered":"\u5982\u4f55\u521b\u5efa\u4e00\u4e2a\u65b0\u7684 TypeScript \u9879\u76ee"},"content":{"rendered":"<h2 id=\"%d9%85%d9%82%d8%af%d9%85%d9%87\">\u4ecb\u7ecd<\/h2>\n<p>\u60a8\u53ef\u80fd\u5df2\u7ecf\u5728\u4f7f\u7528 TypeScript \u65f6\u63a5\u89e6\u8fc7\u5b83\uff0c\u4f8b\u5982\u901a\u8fc7\u5165\u95e8\u9879\u76ee\u6216 Angular CLI \u7b49\u5de5\u5177\u3002\u5728\u672c\u6559\u7a0b\u4e2d\uff0c\u60a8\u5c06\u5b66\u4e60\u5982\u4f55\u5728\u4e0d\u4f7f\u7528\u5165\u95e8\u9879\u76ee\u7684\u60c5\u51b5\u4e0b\u642d\u5efa TypeScript \u9879\u76ee\u3002\u60a8\u8fd8\u5c06\u5b66\u4e60 TypeScript \u4e2d\u7684\u7f16\u8bd1\u673a\u5236\u4ee5\u53ca\u5982\u4f55\u5728 TypeScript \u9879\u76ee\u4e2d\u4f7f\u7528\u4ee3\u7801\u68c0\u67e5\u5de5\u5177 (linter)\u3002.<\/p>\n<h5 id=\"%d9%be%db%8c%d8%b4-%d9%86%db%8c%d8%a7%d8%b2%d9%87%d8%a7\">\u5148\u51b3\u6761\u4ef6<\/h5>\n<ul>\n<li>\u8bbe\u5907\u4e0a\u5df2\u5b89\u88c5\u6700\u65b0\u7248\u672c\u7684Node\u3002<\/li>\n<li>\u4e86\u89e3\u00a0 <code>npm<\/code><\/li>\n<\/ul>\n<h2 id=\"%d9%85%d8%b1%d8%ad%d9%84%d9%87-1-%d8%b4%d8%b1%d9%88%d8%b9-%d9%be%d8%b1%d9%88%da%98%d9%87-typescript\">\u6b65\u9aa4 1 \u2013 \u521b\u5efa\u4e00\u4e2a TypeScript \u9879\u76ee<\/h2>\n<p>\u8981\u5f00\u59cb\u4f60\u7684 TypeScript \u9879\u76ee\uff0c\u4f60\u9700\u8981\u4e3a\u4f60\u7684\u9879\u76ee\u521b\u5efa\u4e00\u4e2a\u76ee\u5f55\uff1a<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\">mkdir typescript-project<\/pre>\n<\/div>\n<p>\u73b0\u5728\u5207\u6362\u5230\u4f60\u7684\u9879\u76ee\u76ee\u5f55\uff1a<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>cd typescript-project<\/code><\/pre>\n<\/div>\n<p>\u60a8\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u9879\u76ee\u76ee\u5f55\u6765\u5b89\u88c5 TypeScript\uff1a<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>npm i typescript --save-dev<\/code><\/pre>\n<\/div>\n<p>\u65d7\u5e1c\u5f88\u91cd\u8981\u3002 <code>--save-dev<\/code> \u6dfb\u52a0 TypeScript\uff0c\u56e0\u4e3a\u5b83\u4f1a\u5c06 TypeScript \u4f5c\u4e3a\u5f00\u53d1\u4f9d\u8d56\u9879\u5b58\u50a8\u3002\u8fd9\u610f\u5473\u7740 TypeScript \u662f\u9879\u76ee\u5f00\u53d1\u6240\u5fc5\u9700\u7684\u3002.<\/p>\n<p>\u5b89\u88c5 TypeScript \u540e\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u521d\u59cb\u5316 TypeScript \u9879\u76ee\uff1a<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>npx tsc --init<\/code><\/pre>\n<\/div>\n<p><code>npm<\/code> \u5b83\u8fd8\u6709\u4e00\u4e2a\u540d\u4e3a\u201c <code>npx<\/code> \u6267\u884c\u53ef\u6267\u884c\u5305\u3002. <code>npx<\/code> \u5b83\u5141\u8bb8\u6211\u4eec\u8fd0\u884c\u8f6f\u4ef6\u5305\u800c\u65e0\u9700\u5168\u5c40\u5b89\u88c5\u3002.<\/p>\n<p>\u547d\u4ee4 <code>tsc<\/code> \u4e4b\u6240\u4ee5\u5728\u8fd9\u91cc\u4f7f\u7528\u5b83\uff0c\u662f\u56e0\u4e3a\u5b83\u662f TypeScript \u7684\u5185\u7f6e\u7f16\u8bd1\u5668\u3002\u5f53\u4f60\u7528 TypeScript \u7f16\u5199\u4ee3\u7801\u65f6\uff0c\u6267\u884c\u8fc7\u7a0b\u4f1a\u2026\u2026 <code>tsc<\/code> \u5b83\u53ef\u4ee5\u5c06\u60a8\u7684\u4ee3\u7801\u8f6c\u6362\u6216\u7f16\u8bd1\u6210 JavaScript\u3002.<\/p>\n<p>\u4f7f\u7528\u6807\u5fd7 <code>--init<\/code> \u4e0a\u8ff0\u547d\u4ee4\u4f1a\u901a\u8fc7\u5728 TypeScript \u9879\u76ee\u76ee\u5f55\u4e2d\u521b\u5efa tsconfig.json \u6587\u4ef6\u6765\u521d\u59cb\u5316\u9879\u76ee\u3002\u8be5 tsconfig.json \u6587\u4ef6\u5141\u8bb8\u60a8\u8fdb\u884c\u8fdb\u4e00\u6b65\u7684\u914d\u7f6e\uff0c\u5e76\u5b9a\u4e49 TypeScript \u548c\u7f16\u8bd1\u5668\u4e4b\u95f4\u7684\u4ea4\u4e92\u65b9\u5f0f\u3002 <code>tsc<\/code> \u81ea\u5b9a\u4e49\u3002\u60a8\u53ef\u4ee5\u6839\u636e\u81ea\u8eab\u9700\u6c42\uff0c\u5728\u6b64\u6587\u4ef6\u4e2d\u5220\u9664\u3001\u6dfb\u52a0\u548c\u4fee\u6539\u914d\u7f6e\u9879\u3002.<\/p>\n<p><code>tsconfig.json<\/code> \u5728\u7f16\u8f91\u5668\u4e2d\u6253\u5f00\u5b83\uff0c\u5373\u53ef\u627e\u5230\u9ed8\u8ba4\u914d\u7f6e\uff1a<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>nano tsconfig.json<\/code><\/pre>\n<\/div>\n<p>\u5c06\u4f1a\u6709\u5f88\u591a\u9009\u62e9\uff0c\u5176\u4e2d\u5927\u90e8\u5206\u5c06\u5728\u4e0b\u6587\u89e3\u91ca\uff1a<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-ts\" data-lang=\"TypeScript\"><code>{\r\n\"compilerOptions\": {\r\n\/* Visit https:\/\/aka.ms\/tsconfig.json to read more about this file *\/\r\n\/* Projects *\/\r\n\/\/ \"incremental\": true, \/* Enable incremental compilation *\/\r\n\/\/ \"composite\": true, \/* Enable constraints that allow a TypeScript project to be used with project references. *\/\r\n\/\/ \"tsBuildInfoFile\": \".\/\", \/* Specify the folder for .tsbuildinfo incremental compilation files. *\/\r\n\/\/ \"disableSourceOfProjectReferenceRedirect\": true, \/* Disable preferring source files instead of declaration files when referencing composite projects *\/\r\n\/\/ \"disableSolutionSearching\": true, \/* Opt a project out of multi-project reference checking when editing. *\/\r\n\/\/ \"disableReferencedProjectLoad\": true, \/* Reduce the number of projects loaded automatically by TypeScript. *\/\r\n. . .\r\n}\r\n}<\/code><\/pre>\n<\/div>\n<p>\u60a8\u53ef\u4ee5\u901a\u8fc7 tsconfig.json \u6587\u4ef6\u81ea\u5b9a\u4e49 TypeScript \u914d\u7f6e\u3002\u4f8b\u5982\uff0c\u60a8\u53ef\u4ee5\u53d6\u6d88\u6ce8\u91ca outDir \u6761\u76ee\u5e76\u5c06\u5176\u8bbe\u7f6e\u4e3a\u201c.\/build\u201d\uff0c\u8fd9\u6837\u6240\u6709\u7f16\u8bd1\u540e\u7684 TypeScript \u6587\u4ef6\u90fd\u4f1a\u653e\u5728\u8be5\u76ee\u5f55\u4e2d\u3002.<\/p>\n<p>\u901a\u8fc7\u5b89\u88c5 TypeScript \u548c\u5b89\u88c5\u6587\u4ef6 <code>tsconfig.json<\/code>\u73b0\u5728\u4f60\u53ef\u4ee5\u5f00\u59cb\u7f16\u5199 TypeScript \u5e94\u7528\u7a0b\u5e8f\u5e76\u8fdb\u884c\u7f16\u8bd1\u4e86\u3002.<\/p>\n<h2 id=\"%d9%85%d8%b1%d8%ad%d9%84%d9%87-2-%da%a9%d8%a7%d9%85%d9%be%d8%a7%db%8c%d9%84-%d9%be%d8%b1%d9%88%da%98%d9%87-typescript\">\u6b65\u9aa4 2 \u2013 \u7f16\u8bd1 TypeScript \u9879\u76ee<\/h2>\n<p>\u73b0\u5728\u4f60\u53ef\u4ee5\u5f00\u59cb\u7f16\u5199\u4f60\u7684 TypeScript \u9879\u76ee\u4e86\u3002\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a `&lt;filename&gt;` \u7684\u65b0\u6587\u4ef6\u3002 <code>index.ts<\/code> \u5728\u7f16\u8f91\u5668\u4e2d\u6253\u5f00\u5b83\u3002\u5c06\u4ee5\u4e0b TypeScript \u4ee3\u7801\u7c98\u8d34\u5230\u5176\u4e2d\u3002 <code>index.ts<\/code> \u5199\uff1a<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-ts\" data-lang=\"TypeScript\"><code>const world = 'world';\r\nexport function hello(who: string = world): string {\r\nreturn `Hello ${who}! `;\r\n}<\/code><\/pre>\n<\/div>\n<p>\u6709\u4e86\u8fd9\u6bb5 TypeScript \u4ee3\u7801\uff0c\u4f60\u7684\u9879\u76ee\u5c31\u53ef\u4ee5\u7f16\u8bd1\u4e86\u3002\u5728\u9879\u76ee\u76ee\u5f55\u4e0b\u8fd0\u884c tsc \u547d\u4ee4\uff1a<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>npx tsc<\/code><\/pre>\n<\/div>\n<p>\u4f60\u4f1a\u6ce8\u610f\u5230\uff0c\u5982\u679c\u4f60\u5728 tsconfig.js \u6587\u4ef6\u4e2d\u6307\u5b9a\u4e86 build \u6587\u4ef6\u5939\uff0c\u90a3\u4e48\u7f16\u8bd1\u540e\u7684 JavaScript \u6587\u4ef6 index.js \u548c sourcemap \u6587\u4ef6 index.js.map \u90fd\u4f1a\u88ab\u6dfb\u52a0\u5230\u8be5\u6587\u4ef6\u5939\u4e2d\u3002.<\/p>\n<p><code>index.js<\/code> \u6253\u5f00\u5b83\uff0c\u60a8\u5c06\u770b\u5230\u4ee5\u4e0b\u7f16\u8bd1\u540e\u7684 JavaScript \u4ee3\u7801\uff1a<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-ts\" data-lang=\"TypeScript\"><code>\"use strict\";\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nexports.hello = void 0;\r\nconst world = 'world';\r\nfunction hello(who = world) {\r\nreturn `Hello ${who}! `;\r\n}\r\nexports.hello = hello;<\/code><\/pre>\n<\/div>\n<p>\u6bcf\u6b21\u4fee\u6539\u4ee3\u7801\u90fd\u8fd0\u884c TypeScript \u7f16\u8bd1\u5668\u53ef\u80fd\u5f88\u7e41\u7410\u3002\u4e3a\u4e86\u89e3\u51b3\u8fd9\u4e2a\u95ee\u9898\uff0c\u4f60\u53ef\u4ee5\u5c06\u7f16\u8bd1\u5668\u8bbe\u7f6e\u4e3a\u76d1\u89c6\u6a21\u5f0f\uff0c\u8fd9\u6837\u6bcf\u6b21\u4ee3\u7801\u4fee\u6539\u540e\u5b83\u90fd\u4f1a\u91cd\u65b0\u7f16\u8bd1\u3002.<\/p>\n<p>\u60a8\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u542f\u7528\u76d1\u89c6\u6a21\u5f0f\uff1a<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>npx tsc -w<\/code><\/pre>\n<\/div>\n<p>\u60a8\u5df2\u7ecf\u4e86\u89e3\u4e86 TypeScript \u7f16\u8bd1\u5668\u7684\u5de5\u4f5c\u539f\u7406\uff0c\u73b0\u5728\u53ef\u4ee5\u6210\u529f\u7f16\u8bd1 TypeScript \u6587\u4ef6\u3002\u60a8\u53ef\u4ee5\u901a\u8fc7\u5728\u5de5\u4f5c\u6d41\u7a0b\u4e2d\u5f15\u5165\u4ee3\u7801\u68c0\u67e5\u5de5\u5177 (linter) \u6765\u63d0\u5347 TypeScript \u9879\u76ee\u6c34\u5e73\u3002.<\/p>\n<h2 id=\"%d9%85%d8%b1%d8%ad%d9%84%d9%87-3-%d8%a7%d8%b3%d8%aa%d9%81%d8%a7%d8%af%d9%87-%d8%a7%d8%b2-google-typescript-style-%d8%a8%d8%b1%d8%a7%db%8c-%d9%be%d8%b1-%da%a9%d8%b1%d8%af%d9%86-%d9%88-%d8%aa\">\u6b65\u9aa4 3 \u2013 \u4f7f\u7528 Google TypeScript \u6837\u5f0f\u8868\u586b\u5199\u548c\u66f4\u6b63\u60a8\u7684\u4ee3\u7801<\/h2>\n<p>\u5728\u7f16\u5199\u4ee3\u7801\u65f6\u4f7f\u7528\u4ee3\u7801\u68c0\u67e5\u5de5\u5177\uff08linter\uff09\u53ef\u4ee5\u5e2e\u52a9\u60a8\u5feb\u901f\u53d1\u73b0\u4ee3\u7801\u4e2d\u7684\u4e0d\u4e00\u81f4\u4e4b\u5904\u3001\u8bed\u6cd5\u9519\u8bef\u548c\u9057\u6f0f\u3002\u6b64\u5916\uff0c\u4ee3\u7801\u98ce\u683c\u6307\u5357\u4e0d\u4ec5\u53ef\u4ee5\u5e2e\u52a9\u60a8\u786e\u4fdd\u4ee3\u7801\u683c\u5f0f\u826f\u597d\u4e14\u4e00\u81f4\uff0c\u8fd8\u5141\u8bb8\u60a8\u4f7f\u7528\u5176\u4ed6\u5de5\u5177\u6765\u5f3a\u5236\u6267\u884c\u8fd9\u79cd\u98ce\u683c\u3002ESLint \u5c31\u662f\u4e00\u6b3e\u5e38\u7528\u7684\u5de5\u5177\uff0c\u5b83\u4e0e\u8bb8\u591a\u96c6\u6210\u5f00\u53d1\u73af\u5883\uff08IDE\uff09\u90fd\u80fd\u5f88\u597d\u5730\u914d\u5408\u4f7f\u7528\uff0c\u4ece\u800c\u8f85\u52a9\u5f00\u53d1\u8fc7\u7a0b\u3002.<\/p>\n<p>\u9879\u76ee\u542f\u52a8\u8fd0\u884c\u540e\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528 TypeScript \u751f\u6001\u7cfb\u7edf\u4e2d\u7684\u5176\u4ed6\u5de5\u5177\u6765\u907f\u514d\u624b\u52a8\u914d\u7f6e tsconfig.json \u6587\u4ef6\u3002Google TypeScript Style \u5c31\u662f\u5176\u4e2d\u4e4b\u4e00\u3002Google TypeScript Style\uff08\u7b80\u79f0 GTS\uff09\u96c6\u6837\u5f0f\u6307\u5357\u3001\u5185\u8054\u6837\u5f0f\u8868\u548c\u81ea\u52a8\u4ee3\u7801\u7ea0\u9519\u5668\u4e8e\u4e00\u4f53\u3002\u4f7f\u7528 GTS \u53ef\u4ee5\u5e2e\u52a9\u60a8\u5feb\u901f\u542f\u52a8\u65b0\u7684 TypeScript \u9879\u76ee\uff0c\u65e0\u9700\u62c5\u5fc3\u7e41\u7410\u7684\u7ec4\u7ec7\u7ec6\u8282\uff0c\u4ece\u800c\u4e13\u6ce8\u4e8e\u9879\u76ee\u8bbe\u8ba1\u3002GTS \u8fd8\u63d0\u4f9b\u9ed8\u8ba4\u8bbe\u7f6e\uff0c\u8fd9\u610f\u5473\u7740\u60a8\u65e0\u9700\u81ea\u5b9a\u4e49\u592a\u591a\u8bbe\u7f6e\u3002.<\/p>\n<p>\u9996\u5148\u5b89\u88c5 GTS\uff1a<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>npm i gts --save-dev<\/code><\/pre>\n<\/div>\n<p>\u63a5\u4e0b\u6765\uff0c\u4f7f\u7528\u4ee5\u4e0b\u547d\u4ee4\u521d\u59cb\u5316 GTS\uff1a<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>npx gts init<\/code><\/pre>\n<\/div>\n<p>\u4e0a\u8ff0\u547d\u4ee4\u5c06\u521b\u5efa\u60a8\u5f00\u59cb\u4f7f\u7528 TypeScript \u6240\u9700\u7684\u4e00\u5207\uff0c\u5305\u62ec tsconfig.json \u6587\u4ef6\u548c\u4ee3\u7801\u68c0\u67e5\u914d\u7f6e\u3002\u5982\u679c\u60a8\u8fd8\u6ca1\u6709 package.json \u6587\u4ef6\uff0c\u5b83\u8fd8\u4f1a\u521b\u5efa\u4e00\u4e2a\u3002.<\/p>\n<p>\u8fd0\u884c `npx gts init` \u8fd8\u4f1a\u5c06\u4e00\u4e9b\u6709\u7528\u7684 npm \u811a\u672c\u6dfb\u52a0\u5230\u4f60\u7684 package.json \u6587\u4ef6\u4e2d\u3002\u4f8b\u5982\uff0c\u73b0\u5728\u4f60\u53ef\u4ee5\u8fd0\u884c `npm run compile` \u6765\u7f16\u8bd1\u4f60\u7684 TypeScript \u9879\u76ee\u3002\u8981\u68c0\u67e5\u67d0\u4e9b\u9519\u8bef\uff0c\u4f60\u73b0\u5728\u53ef\u4ee5\u8fd0\u884c `npm run check`\u3002.<\/p>\n<p>GTS \u73b0\u5df2\u5b89\u88c5\u5e76\u6b63\u786e\u96c6\u6210\u5230\u60a8\u7684 TypeScript \u9879\u76ee\u4e2d\u3002\u5728\u4ee5\u540e\u7684\u9879\u76ee\u4e2d\u4f7f\u7528 GTS\uff0c\u60a8\u53ef\u4ee5\u5feb\u901f\u8bbe\u7f6e\u65b0\u7684 TypeScript \u9879\u76ee\u53ca\u5176\u5fc5\u8981\u7684\u914d\u7f6e\u3002.<\/p>\n<p>\u7531\u4e8e GTS \u63d0\u4f9b\u4e86\u4e00\u79cd\u65e0\u9700\u914d\u7f6e\u3001\u57fa\u4e8e\u5224\u65ad\u7684\u65b9\u6cd5\uff0c\u5b83\u4f7f\u7528\u81ea\u8eab\u5408\u7406\u7684\u89c4\u5219\u3002\u8fd9\u4e9b\u89c4\u5219\u9075\u5faa\u6700\u4f73\u5b9e\u8df5\uff0c\u4f46\u5982\u679c\u60a8\u9700\u8981\u4ee5\u4efb\u4f55\u65b9\u5f0f\u66f4\u6539\u89c4\u5219\uff0c\u53ef\u4ee5\u901a\u8fc7\u6269\u5c55\u9ed8\u8ba4\u7684 eslint \u89c4\u5219\u6765\u5b9e\u73b0\u3002\u4e3a\u6b64\uff0c\u8bf7\u5728\u9879\u76ee\u76ee\u5f55\u4e2d\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a .eslintrc \u7684\u6587\u4ef6\uff0c\u5e76\u6269\u5c55\u6837\u5f0f\u89c4\u5219\uff1a<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>---\r\nextends:\r\n- '.\/node_modules\/gts'<\/code><\/pre>\n<\/div>\n<p>\u8fd9\u6837\uff0c\u60a8\u5c31\u53ef\u4ee5\u6dfb\u52a0\u6216\u4fee\u6539 GTS \u63d0\u4f9b\u7684\u6837\u5f0f\u89c4\u5219\u3002.<\/p>\n<h2 id=\"%d9%86%d8%aa%db%8c%d8%ac%d9%87\">\u7ed3\u679c<\/h2>\n<p>\u5728\u672c\u6559\u7a0b\u4e2d\uff0c\u60a8\u521b\u5efa\u4e86\u4e00\u4e2a\u5e26\u6709\u81ea\u5b9a\u4e49\u8bbe\u7f6e\u7684 TypeScript \u9879\u76ee\uff0c\u5e76\u5c06 Google TypeScript Style (GTS) \u96c6\u6210\u5230\u4e86\u60a8\u7684 TypeScript \u9879\u76ee\u4e2d\u3002\u4f7f\u7528 GTS \u53ef\u4ee5\u5e2e\u52a9\u60a8\u5feb\u901f\u4e0a\u624b\u65b0\u7684 TypeScript \u9879\u76ee\u3002\u501f\u52a9 GTS\uff0c\u60a8\u65e0\u9700\u624b\u52a8\u8bbe\u7f6e\u914d\u7f6e\u6216\u5c06\u4ee3\u7801\u68c0\u67e5\u5de5\u5177\u96c6\u6210\u5230\u60a8\u7684\u5de5\u4f5c\u6d41\u7a0b\u4e2d\u3002.<\/p>","protected":false},"excerpt":{"rendered":"\u5f15\u8a00 \u60a8\u53ef\u80fd\u5df2\u7ecf\u5728\u4f7f\u7528\u5165\u95e8\u9879\u76ee\u6216 Angular CLI \u7b49\u5de5\u5177\u65f6\u63a5\u89e6\u8fc7 TypeScript\u3002","protected":false},"author":1,"featured_media":15191,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_yoast_wpseo_focuskw":"","_yoast_wpseo_title":"","_yoast_wpseo_metadesc":"","_yoast_wpseo_canonical":"","_yoast_wpseo_opengraph-description":"","_yoast_wpseo_opengraph-image":"","_yoast_wpseo_twitter-description":"","_yoast_wpseo_twitter-image":"","_yoast_wpseo_focuskeywords":"","_yoast_wpseo_primary_category":"193","footnotes":""},"categories":[193,363],"tags":[416,366],"class_list":{"0":"post-15190","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-tutorials","8":"category-programming","9":"tag-typescript","10":"tag-366"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u0686\u06af\u0648\u0646\u0647 \u06cc\u06a9 \u067e\u0631\u0648\u0698\u0647 TypeScript \u062c\u062f\u06cc\u062f \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06a9\u0646\u06cc\u0645 - \u0628\u0644\u0627\u06af ITPiran<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.itpiran.net\/blog\/zh\/tutorials\/typescript-new-projectstep-1-starting-the-typescript-project\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u0686\u06af\u0648\u0646\u0647 \u06cc\u06a9 \u067e\u0631\u0648\u0698\u0647 TypeScript \u062c\u062f\u06cc\u062f \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06a9\u0646\u06cc\u0645 - \u0628\u0644\u0627\u06af ITPiran\" \/>\n<meta property=\"og:description\" content=\"\u0645\u0642\u062f\u0645\u0647 \u0645\u0645\u06a9\u0646 \u0627\u0633\u062a \u0642\u0628\u0644\u0627\u064b \u0647\u0646\u06af\u0627\u0645 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u06cc\u06a9 \u067e\u0631\u0648\u0698\u0647 \u0634\u0631\u0648\u0639 \u06cc\u0627 \u0627\u0628\u0632\u0627\u0631\u06cc \u0645\u0627\u0646\u0646\u062f Angular CLI \u0628\u0627 TypeScript \u06a9\u0627\u0631&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.itpiran.net\/blog\/zh\/tutorials\/typescript-new-projectstep-1-starting-the-typescript-project\/\" \/>\n<meta property=\"og:site_name\" content=\"\u0628\u0644\u0627\u06af ITPiran\" \/>\n<meta property=\"article:published_time\" content=\"2024-04-01T13:38:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.itpiran.net\/2024\/04\/01170716\/Type-Script.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1793\" \/>\n\t<meta property=\"og:image:height\" content=\"1110\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/typescript-new-projectstep-1-starting-the-typescript-project\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/typescript-new-projectstep-1-starting-the-typescript-project\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#\\\/schema\\\/person\\\/04ed27b919baca468a2273f8e4318f81\"},\"headline\":\"\u0686\u06af\u0648\u0646\u0647 \u06cc\u06a9 \u067e\u0631\u0648\u0698\u0647 TypeScript \u062c\u062f\u06cc\u062f \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06a9\u0646\u06cc\u0645\",\"datePublished\":\"2024-04-01T13:38:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/typescript-new-projectstep-1-starting-the-typescript-project\\\/\"},\"wordCount\":108,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/typescript-new-projectstep-1-starting-the-typescript-project\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/04\\\/01170716\\\/Type-Script.jpg\",\"keywords\":[\"typeScript\",\"\u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc\"],\"articleSection\":[\"\u0622\u0645\u0648\u0632\u0634\u06cc\",\"\u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/typescript-new-projectstep-1-starting-the-typescript-project\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/typescript-new-projectstep-1-starting-the-typescript-project\\\/\",\"url\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/typescript-new-projectstep-1-starting-the-typescript-project\\\/\",\"name\":\"\u0686\u06af\u0648\u0646\u0647 \u06cc\u06a9 \u067e\u0631\u0648\u0698\u0647 TypeScript \u062c\u062f\u06cc\u062f \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06a9\u0646\u06cc\u0645 - \u0628\u0644\u0627\u06af ITPiran\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/typescript-new-projectstep-1-starting-the-typescript-project\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/typescript-new-projectstep-1-starting-the-typescript-project\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/04\\\/01170716\\\/Type-Script.jpg\",\"datePublished\":\"2024-04-01T13:38:49+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/typescript-new-projectstep-1-starting-the-typescript-project\\\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/typescript-new-projectstep-1-starting-the-typescript-project\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/typescript-new-projectstep-1-starting-the-typescript-project\\\/#primaryimage\",\"url\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/04\\\/01170716\\\/Type-Script.jpg\",\"contentUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/04\\\/01170716\\\/Type-Script.jpg\",\"width\":1793,\"height\":1110},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/typescript-new-projectstep-1-starting-the-typescript-project\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u0622\u0645\u0648\u0632\u0634\u06cc\",\"item\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/category\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"\u0686\u06af\u0648\u0646\u0647 \u06cc\u06a9 \u067e\u0631\u0648\u0698\u0647 TypeScript \u062c\u062f\u06cc\u062f \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06a9\u0646\u06cc\u0645\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/\",\"name\":\"\u0628\u0644\u0627\u06af ITPiran\",\"description\":\"\u0627\u062e\u0628\u0627\u0631 \u0648 \u0645\u0642\u0627\u0644\u0627\u062a \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u06cc\u062f\u0627\u0631 \u0627\u06cc\u0631\u0627\u0646\u06cc\u0627\u0646\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#organization\",\"name\":\"\u0628\u0644\u0627\u06af \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u06cc\u062f\u0627\u0631 \u0627\u06cc\u0631\u0627\u0646\u06cc\u0627\u0646\",\"alternateName\":\"ITPIran Blog\",\"url\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/cdn.itpiran.net\\\/2023\\\/12\\\/27150508\\\/cropped-ITPIRAN-BLOG-LOGO-2.png\",\"contentUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2023\\\/12\\\/27150508\\\/cropped-ITPIRAN-BLOG-LOGO-2.png\",\"width\":512,\"height\":512,\"caption\":\"\u0628\u0644\u0627\u06af \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u06cc\u062f\u0627\u0631 \u0627\u06cc\u0631\u0627\u0646\u06cc\u0627\u0646\"},\"image\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#\\\/schema\\\/person\\\/04ed27b919baca468a2273f8e4318f81\",\"name\":\"admin\",\"url\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/zh\\\/author\\\/admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u5982\u4f55\u5f00\u59cb\u4e00\u4e2a\u65b0\u7684 TypeScript \u9879\u76ee - ITPiran \u535a\u5ba2","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.itpiran.net\/blog\/zh\/tutorials\/typescript-new-projectstep-1-starting-the-typescript-project\/","og_locale":"zh_CN","og_type":"article","og_title":"\u0686\u06af\u0648\u0646\u0647 \u06cc\u06a9 \u067e\u0631\u0648\u0698\u0647 TypeScript \u062c\u062f\u06cc\u062f \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06a9\u0646\u06cc\u0645 - \u0628\u0644\u0627\u06af ITPiran","og_description":"\u0645\u0642\u062f\u0645\u0647 \u0645\u0645\u06a9\u0646 \u0627\u0633\u062a \u0642\u0628\u0644\u0627\u064b \u0647\u0646\u06af\u0627\u0645 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u06cc\u06a9 \u067e\u0631\u0648\u0698\u0647 \u0634\u0631\u0648\u0639 \u06cc\u0627 \u0627\u0628\u0632\u0627\u0631\u06cc \u0645\u0627\u0646\u0646\u062f Angular CLI \u0628\u0627 TypeScript \u06a9\u0627\u0631&hellip;","og_url":"https:\/\/www.itpiran.net\/blog\/zh\/tutorials\/typescript-new-projectstep-1-starting-the-typescript-project\/","og_site_name":"\u0628\u0644\u0627\u06af ITPiran","article_published_time":"2024-04-01T13:38:49+00:00","og_image":[{"width":1793,"height":1110,"url":"https:\/\/cdn.itpiran.net\/2024\/04\/01170716\/Type-Script.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/typescript-new-projectstep-1-starting-the-typescript-project\/#article","isPartOf":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/typescript-new-projectstep-1-starting-the-typescript-project\/"},"author":{"name":"admin","@id":"https:\/\/www.itpiran.net\/blog\/#\/schema\/person\/04ed27b919baca468a2273f8e4318f81"},"headline":"\u0686\u06af\u0648\u0646\u0647 \u06cc\u06a9 \u067e\u0631\u0648\u0698\u0647 TypeScript \u062c\u062f\u06cc\u062f \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06a9\u0646\u06cc\u0645","datePublished":"2024-04-01T13:38:49+00:00","mainEntityOfPage":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/typescript-new-projectstep-1-starting-the-typescript-project\/"},"wordCount":108,"commentCount":0,"publisher":{"@id":"https:\/\/www.itpiran.net\/blog\/#organization"},"image":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/typescript-new-projectstep-1-starting-the-typescript-project\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.itpiran.net\/2024\/04\/01170716\/Type-Script.jpg","keywords":["typeScript","\u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc"],"articleSection":["\u0622\u0645\u0648\u0632\u0634\u06cc","\u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.itpiran.net\/blog\/tutorials\/typescript-new-projectstep-1-starting-the-typescript-project\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/typescript-new-projectstep-1-starting-the-typescript-project\/","url":"https:\/\/www.itpiran.net\/blog\/tutorials\/typescript-new-projectstep-1-starting-the-typescript-project\/","name":"\u5982\u4f55\u5f00\u59cb\u4e00\u4e2a\u65b0\u7684 TypeScript \u9879\u76ee - ITPiran \u535a\u5ba2","isPartOf":{"@id":"https:\/\/www.itpiran.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/typescript-new-projectstep-1-starting-the-typescript-project\/#primaryimage"},"image":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/typescript-new-projectstep-1-starting-the-typescript-project\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.itpiran.net\/2024\/04\/01170716\/Type-Script.jpg","datePublished":"2024-04-01T13:38:49+00:00","breadcrumb":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/typescript-new-projectstep-1-starting-the-typescript-project\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.itpiran.net\/blog\/tutorials\/typescript-new-projectstep-1-starting-the-typescript-project\/"]}]},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/typescript-new-projectstep-1-starting-the-typescript-project\/#primaryimage","url":"https:\/\/cdn.itpiran.net\/2024\/04\/01170716\/Type-Script.jpg","contentUrl":"https:\/\/cdn.itpiran.net\/2024\/04\/01170716\/Type-Script.jpg","width":1793,"height":1110},{"@type":"BreadcrumbList","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/typescript-new-projectstep-1-starting-the-typescript-project\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.itpiran.net\/blog\/"},{"@type":"ListItem","position":2,"name":"\u0622\u0645\u0648\u0632\u0634\u06cc","item":"https:\/\/www.itpiran.net\/blog\/category\/tutorials\/"},{"@type":"ListItem","position":3,"name":"\u0686\u06af\u0648\u0646\u0647 \u06cc\u06a9 \u067e\u0631\u0648\u0698\u0647 TypeScript \u062c\u062f\u06cc\u062f \u0631\u0627\u0647 \u0627\u0646\u062f\u0627\u0632\u06cc \u06a9\u0646\u06cc\u0645"}]},{"@type":"WebSite","@id":"https:\/\/www.itpiran.net\/blog\/#website","url":"https:\/\/www.itpiran.net\/blog\/","name":"ITPiran\u535a\u5ba2","description":"\u4f0a\u6717\u53ef\u6301\u7eed\u8d38\u6613\u65b0\u95fb\u548c\u6587\u7ae0","publisher":{"@id":"https:\/\/www.itpiran.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.itpiran.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":"Organization","@id":"https:\/\/www.itpiran.net\/blog\/#organization","name":"\u4f0a\u6717\u53ef\u6301\u7eed\u5546\u4e1a\u535a\u5ba2","alternateName":"ITPIran Blog","url":"https:\/\/www.itpiran.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.itpiran.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdn.itpiran.net\/2023\/12\/27150508\/cropped-ITPIRAN-BLOG-LOGO-2.png","contentUrl":"https:\/\/cdn.itpiran.net\/2023\/12\/27150508\/cropped-ITPIRAN-BLOG-LOGO-2.png","width":512,"height":512,"caption":"\u0628\u0644\u0627\u06af \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u06cc\u062f\u0627\u0631 \u0627\u06cc\u0631\u0627\u0646\u06cc\u0627\u0646"},"image":{"@id":"https:\/\/www.itpiran.net\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.itpiran.net\/blog\/#\/schema\/person\/04ed27b919baca468a2273f8e4318f81","name":"\u884c\u653f","url":"https:\/\/www.itpiran.net\/blog\/zh\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.itpiran.net\/blog\/zh\/wp-json\/wp\/v2\/posts\/15190","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itpiran.net\/blog\/zh\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itpiran.net\/blog\/zh\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/zh\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/zh\/wp-json\/wp\/v2\/comments?post=15190"}],"version-history":[{"count":1,"href":"https:\/\/www.itpiran.net\/blog\/zh\/wp-json\/wp\/v2\/posts\/15190\/revisions"}],"predecessor-version":[{"id":15192,"href":"https:\/\/www.itpiran.net\/blog\/zh\/wp-json\/wp\/v2\/posts\/15190\/revisions\/15192"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/zh\/wp-json\/wp\/v2\/media\/15191"}],"wp:attachment":[{"href":"https:\/\/www.itpiran.net\/blog\/zh\/wp-json\/wp\/v2\/media?parent=15190"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/zh\/wp-json\/wp\/v2\/categories?post=15190"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/zh\/wp-json\/wp\/v2\/tags?post=15190"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}