https://github.com/danielmlc/typescript-design
基于typescript的设计模式
https://github.com/danielmlc/typescript-design
Last synced: about 2 months ago
JSON representation
基于typescript的设计模式
- Host: GitHub
- URL: https://github.com/danielmlc/typescript-design
- Owner: danielmlc
- Created: 2019-10-26T13:47:44.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2025-03-02T13:29:32.000Z (2 months ago)
- Last Synced: 2025-03-02T14:28:39.496Z (2 months ago)
- Language: JavaScript
- Size: 20.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
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` 关键字 用在继承接口或者类,继承时必须实现接口或类中定义的变量或方法。