mirror of
https://github.com/zh-google-styleguide/zh-google-styleguide.git
synced 2025-02-19 20:50:10 +08:00
[TypeScript] introduction.
This commit is contained in:
parent
782f461f6f
commit
3fa77f1b8d
@ -3,11 +3,12 @@ TypeScript 风格指南
|
|||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:caption: 目录
|
:caption: 目录
|
||||||
|
:maxdepth: 2
|
||||||
:numbered:
|
:numbered:
|
||||||
|
|
||||||
preface
|
introduction
|
||||||
syntax
|
syntax
|
||||||
language
|
language
|
||||||
source_organization
|
source_organization
|
||||||
type_system
|
type_system
|
||||||
consistency
|
consistency
|
||||||
|
61
google-typescript-styleguide/introduction.rst
Normal file
61
google-typescript-styleguide/introduction.rst
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
导言
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
这份指南基于谷歌内部的 TypeScript 风格指南,但在其基础上做了些许调整,删去了仅适用于谷歌内部的部分内容。这是由于谷歌内部对 TypeScript 的使用方式有着不同于外部其它环境的限制,因此,尽管这些内容对有意向谷歌官方项目提交代码的开发者而言十分有用,却并不一定适合其它的开发环境。
|
||||||
|
|
||||||
|
本指南并非定期自动部署,而是由志愿者们根据需求进行维护与更新。
|
||||||
|
|
||||||
|
.. _ts-terminoloy-notes:
|
||||||
|
|
||||||
|
术语说明
|
||||||
|
********************************************************************************
|
||||||
|
|
||||||
|
指南中对 *必须、禁止、应当、不应、可以* 等术语的用法遵循 `RFC 2119 <https://datatracker.ietf.org/doc/html/rfc2119>`_ 中的规定。术语 *倾向于* 和 *避免* 分别对应 *应当* 和 *不应*。命令式和声明式的语句与术语 *必须* 相对应,表示其内容是规定性的。
|
||||||
|
|
||||||
|
.. _ts-guide-notes:
|
||||||
|
|
||||||
|
指南说明
|
||||||
|
********************************************************************************
|
||||||
|
|
||||||
|
文中的所有示例 **均非规范性示例**,仅用于对指南中的规范性说明加以演示。也就是说,虽然这些示例遵循谷歌的代码风格,但它们并不一定是唯一符合规范的写法。因此,示例中选用的代码样式不能作为规则强制执行。
|
||||||
|
|
||||||
|
.. _ts-about:
|
||||||
|
|
||||||
|
翻译信息
|
||||||
|
********************************************************************************
|
||||||
|
|
||||||
|
.. _ts-about-last-update:
|
||||||
|
|
||||||
|
上次更新日期
|
||||||
|
================================================================================
|
||||||
|
|
||||||
|
2024 年 02 月 29 日。
|
||||||
|
|
||||||
|
.. _ts-about-author:
|
||||||
|
|
||||||
|
译者
|
||||||
|
================================================================================
|
||||||
|
|
||||||
|
* `Frank Li <https://github.com/frank120330>`_
|
||||||
|
|
||||||
|
.. _ts-about-original:
|
||||||
|
|
||||||
|
原文链接
|
||||||
|
================================================================================
|
||||||
|
|
||||||
|
`Google TypeScript Style Guide <https://google.github.io/styleguide/tsguide.html>`_
|
||||||
|
|
||||||
|
.. _ts-about-translation:
|
||||||
|
|
||||||
|
中文版链接
|
||||||
|
================================================================================
|
||||||
|
|
||||||
|
`谷歌 TypeScript 风格指南 <https://zh-google-styleguide.readthedocs.io/en/latest/google-typescript-styleguide/>`_
|
||||||
|
|
||||||
|
.. _ts-about-changelog:
|
||||||
|
|
||||||
|
修订历史
|
||||||
|
================================================================================
|
||||||
|
|
||||||
|
* **2021 年 09 月 02 日:** `Frank Li <https://github.com/frank120330>`_ 提交了第一个版本。
|
||||||
|
* **2024 年 02 月 29 日:** `Frank Li <https://github.com/frank120330>`_ 重新修订了所有内容。
|
@ -1,53 +0,0 @@
|
|||||||
前言
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
.. _ts-introduction:
|
|
||||||
|
|
||||||
简介
|
|
||||||
********************************************************************************
|
|
||||||
|
|
||||||
这份风格指南基于谷歌的内部版本,并在此基础上做了一些修改,使其具有更广泛的适用性。指南并非定期自动部署,而是由志愿者们根据需求进行维护与更新。
|
|
||||||
|
|
||||||
指南中的内容包括代码规范与最佳实践两部分。读者可根据所在团队的需求加以参考和选用。
|
|
||||||
|
|
||||||
指南中对 *必须、禁止、应当、不应、可以* 等词语的用法遵循 `RFC 2119 <https://datatracker.ietf.org/doc/html/rfc2119>`_ 中的定义。文中的所有示例均非适合实际项目的正式用法,只用于对指南中的内容加以说明。
|
|
||||||
|
|
||||||
.. _ts-about:
|
|
||||||
|
|
||||||
翻译信息
|
|
||||||
********************************************************************************
|
|
||||||
|
|
||||||
.. _ts-about-last-update:
|
|
||||||
|
|
||||||
上次更新日期
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
2021 年 09 月 02 日。
|
|
||||||
|
|
||||||
.. _ts-about-author:
|
|
||||||
|
|
||||||
作者
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
* `TinkerRobot <https://github.com/tinkerrobot>`_
|
|
||||||
|
|
||||||
.. _ts-about-original:
|
|
||||||
|
|
||||||
原文链接
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
`Google TypeScript Style Guide <https://google.github.io/styleguide/tsguide.html>`_
|
|
||||||
|
|
||||||
.. _ts-about-translation:
|
|
||||||
|
|
||||||
中文版链接
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
`谷歌 TypeScript 风格指南 <https://zh-google-styleguide.readthedocs.io/en/latest/google-typescript-styleguide/>`_
|
|
||||||
|
|
||||||
.. _ts-about-changelog:
|
|
||||||
|
|
||||||
修订历史
|
|
||||||
================================================================================
|
|
||||||
|
|
||||||
* **2021 年 09 月 02 日:** `TinkerRobot <https://github.com/tinkerrobot>`_ 提交了第一个版本。
|
|
Loading…
Reference in New Issue
Block a user