提交 14a84528 编写于 作者: L linbingquan

Docs: zh for Typescript-setup.html

上级 3c0ec00a
......@@ -462,7 +462,7 @@ var list = {
"浏览器支持": "manual/zh/introduction/Browser-support",
"WebGL兼容性检查": "manual/zh/introduction/WebGL-compatibility-check",
"如何在本地运行Three.js": "manual/zh/introduction/How-to-run-things-locally",
"Typescript setup": "manual/zh/introduction/Typescript-setup",
"Typescript设置": "manual/zh/introduction/Typescript-setup",
"如何使用WebGL 2": "manual/zh/introduction/How-to-use-WebGL2",
"画线": "manual/zh/introduction/Drawing-lines",
"创建文字": "manual/zh/introduction/Creating-text",
......
......@@ -8,22 +8,19 @@
<link type="text/css" rel="stylesheet" href="page.css" />
</head>
<body>
<h1>[name]</h1>
<h1>TypeScript设置([name])</h1>
<p>
three.js is a JavaScript-based library. However, it's possible to use it in a TypeScript project, as the library
exposes [link:https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html Declaration Files] (*d.ts* files).
three.js是一个基于JavaScript的库。但是,可以在TypeScript项目中使用它,因为该库公开了声明文件 [link:https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html Declaration Files](*d.ts* 文件)。
</p>
<p>
A minimal configuration is required for the TypeScript compiler to
discover three.js types.<br>
You will need to set the [link:https://www.typescriptlang.org/docs/handbook/module-resolution.html moduleResolution]
option to *node*, and the [link:https://www.typescriptlang.org/docs/handbook/compiler-options.html target] option to *es6* or newer.
TypeScript编译器需要最少的配置即可发现three.js类型。<br>
你将需要设置 [link:https://www.typescriptlang.org/docs/handbook/module-resolution.html moduleResolution] (模块解析)为 *node* 和 [link:https://www.typescriptlang.org/docs/handbook/compiler-options.html target] (目标) 为 *es6* 或更高版本。
</p>
<code>
// Example of minimal `tsconfig.json` file
// tsconfig.json文件最少配置例子
{
"compilerOptions": {
"target": "es6",
......@@ -34,13 +31,11 @@
</code>
<p>
Note: As of today, it's not yet possible to use three.js typings without using those two options.
注意:到目前为止,如果不使用这两个选项,则无法使用three.js类型。
</p>
<p>
Note: It happens that some declarations are incorrect and/or missing.
Contributing to Declaration Files is really helpful for the community, making three.js
typings better and more accurate.
注意:某些声明可能不正确或缺失。为声明文件做贡献对社区真的很有帮助,使Three.js开发会更好更准确。
</p>
</body>
</html>
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册