Skip to content

Commit f77f8d1

Browse files
committed
docs(declare): fixed wangdoc#91
1 parent d8b2606 commit f77f8d1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/declare.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,13 +296,13 @@ String.prototype.toSmallString = ():string => {
296296

297297
这个示例第一行的空导出语句`export {}`,作用是强制编译器将这个脚本当作模块处理。这是因为`declare global`必须用在模块里面。
298298

299-
下面的示例是为 window 对象添加一个属性`myAppConfig`
299+
下面的示例是为 window 对象(类型接口为`Window`)添加一个属性`myAppConfig`
300300

301301
```typescript
302302
export {};
303303

304304
declare global {
305-
interface window {
305+
interface Window {
306306
myAppConfig:object;
307307
}
308308
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy