Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d9e2fd8

Browse files
committed
Update code types
1 parent aeb928f commit d9e2fd8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

basics/declaration-files.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ declare var jQuery: (selector: string) => any;
5151

5252
一般来说,ts 会解析项目中所有的 `*.ts` 文件,当然也包含以 `.d.ts` 结尾的文件。所以当我们将 `jQuery.d.ts` 放到项目中时,其他所有 `*.ts` 文件就都可以获得 `jQuery` 的类型定义了。
5353

54-
```bash
54+
```plain
5555
/path/to/project
5656
├── README.md
5757
├── src
@@ -99,7 +99,7 @@ npm install @types/jquery --save-dev
9999

100100
使用全局变量的声明文件时,如果是以 `npm install @types/xxx --save-dev` 安装的,则不需要任何配置。如果是将声明文件直接存放于当前项目中,则建议和其他源码一起放到 `src` 目录下(或者对应的源码目录下):
101101

102-
```bash
102+
```plain
103103
/path/to/project
104104
├── README.md
105105
├── src
@@ -408,7 +408,7 @@ jQuery.ajax('/api/get_something');
408408

409409
目录结构:
410410

411-
```bash
411+
```plain
412412
/path/to/project
413413
├── README.md
414414
├── src

0 commit comments

Comments
 (0)