Skip to content

Commit

Permalink
feat: add new blog
Browse files Browse the repository at this point in the history
  • Loading branch information
wood3n committed May 5, 2024
1 parent 970986d commit bf50a56
Show file tree
Hide file tree
Showing 9 changed files with 1,531 additions and 2 deletions.
6 changes: 4 additions & 2 deletions blog/2024-04-01-TS全局类型定义.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ slug: /ts-global-defination
authors: oxygen
---

TypeScript 全局类型定义或者覆盖在日常开发中经常使用,下面介绍几种常见的方式。
TypeScript 全局类型定义或者覆盖在日常开发中经常使用,本文主要介绍几种常见的方式。

<!--truncate-->

# 使用declare global命名空间

Expand Down Expand Up @@ -58,7 +60,7 @@ declare global {
export {}
```

:::warning
:::warning[注意]

使用`declare global`定义全局类型时,该文件内部必须包含至少一个`export`语句!

Expand Down
Loading

0 comments on commit bf50a56

Please sign in to comment.