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

Skip to content

Commit f600567

Browse files
authored
修复 jQuery 的类型申明
1 parent 44e9ba5 commit f600567

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

basics/declaration-files.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jQuery('#foo');
2323
这时,我们需要使用 `declare` 关键字来定义它的类型,帮助 TypeScript 判断我们传入的参数类型对不对:
2424

2525
```ts
26-
declare var jQuery: (string) => any;
26+
declare var jQuery: (selector: string) => any;
2727

2828
jQuery('#foo');
2929
```

0 commit comments

Comments
 (0)