[doc] typo in Declaration Merging. PR1043

This commit is contained in:
zhongsp 2019-07-03 07:12:46 +08:00
parent 6afc7440f7
commit 4759c7c193

View File

@ -247,13 +247,13 @@ TypeScript并非允许所有的合并。
虽然JavaScript不支持合并但你可以为导入的对象打补丁以更新它们。让我们考察一下这个玩具性的示例
```js
// observable.js
```ts
// observable.ts
export class Observable<T> {
// ... implementation left as an exercise for the reader ...
}
// map.js
// map.ts
import { Observable } from "./observable";
Observable.prototype.map = function (f) {
// ... another exercise for the reader