Skip to content

Commit

Permalink
📝 TypeScript 风格指南:类型系统�。
Browse files Browse the repository at this point in the history
  • Loading branch information
tinkerrobot committed Aug 30, 2021
1 parent 37b3c80 commit 4d30f3b
Show file tree
Hide file tree
Showing 3 changed files with 488 additions and 2 deletions.
3 changes: 2 additions & 1 deletion google-typescript-styleguide/contents.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ TypeScript 风格指南
preface
syntax
language
source_organization
source_organization
type_system
2 changes: 1 addition & 1 deletion google-typescript-styleguide/source_organization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ TypeScript 代码必须使用路径进行导入。这里的路径既可以是相
显然,这个文件中具有文件作用域,它可以被用做命名空间。但是,这里创建了第二个作用域——类 ``Foo`` ,这个类在其它文件中具有歧义:它既可以被视为类型,又可以被视为值。

因此,我们应当使用文件作用域作为实质上的命名空间,同时使用具名的导出声明:
因此,应当使用文件作用域作为实质上的命名空间,同时使用具名的导出声明:

.. code-block:: typescript
Expand Down
Loading

0 comments on commit 4d30f3b

Please sign in to comment.