An open API service indexing awesome lists of open source software.

https://github.com/danielmlc/typescript-design

基于typescript的设计模式
https://github.com/danielmlc/typescript-design

Last synced: about 2 months ago
JSON representation

基于typescript的设计模式

Awesome Lists containing this project

README

        

#### 设计模式

- [x] [策略模式](src/strategy-pattern/index.md)
- [x] [观察者模式](src/observer-pattern/index.md)
- [x] [装饰者模式](src/decorator-pattern/index.md)
- [ ] [工厂模式]()
- [ ] [单件模式]()
- [ ] [命令模式]()
- [ ] [适配器与外观模式]()
- [ ] [模板方法模式]()
- [ ] [迭代器与组合模式]()
- [ ] [状态模式]()
- [ ] [代理模式]()
- [ ] [复合模式]()

#### typescrit知识小结

`extends` 关键字 用在类继承中,继承类如果是实体类必须在构造函数中执行super()方法执行父类的构造函数;并且必须实现父类的虚方法。

`implements` 关键字 用在继承接口或者类,继承时必须实现接口或类中定义的变量或方法。