Skip to content

Commit 808da8d

Browse files
committed
Update README, Add comment at closure
1 parent d13c2f2 commit 808da8d

File tree

2 files changed

+19
-22
lines changed

2 files changed

+19
-22
lines changed

โ€ŽREADME.md

+17-22
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,20 @@
22

33
Design pattern with Typescript
44

5-
## Table Of Content
6-
7-
<!-- TOC -->
8-
9-
* [Typescript Design Pattern](#typescript-design-pattern)
10-
* [Table Of Content](#table-of-content)
11-
* [Install](#install)
12-
* [Run](#run)
13-
* [Abstract Factory](#abstract-factory)
14-
* [Factory Method](#factory-method)
15-
* [Singleton](#singleton)
16-
* [Adapter](#adapter)
17-
* [Composite](#composite)
18-
* [Decorator](#decorator)
19-
* [Proxy](#proxy)
20-
* [Command](#command)
21-
* [Observer](#observer)
22-
* [Strategy](#strategy)
23-
* [Template Method](#template-method)
24-
25-
<!-- /TOC -->
5+
## Table Of Contents
6+
7+
- [ ] [Abstract Factory](#abstract-factory)
8+
- [x] [Factory Method](#factory-method)
9+
- [x] [Singleton](#singleton)
10+
- [ ] [Adapter](#adapter)
11+
- [ ] [Composite](#composite)
12+
- [ ] [Decorator](#decorator)
13+
- [ ] [Proxy](#proxy)
14+
- [ ] [Command](#command)
15+
- [ ] [Observer](#observer)
16+
- [ ] [Strategy](#strategy)
17+
- [ ] [Template Method](#template-method)
18+
- [ ] [Closure](#closure)
2619

2720
## Install
2821

@@ -89,7 +82,7 @@ hero.sayHi(); // I'm Ironman., from Earth.
8982

9083
## Singleton
9184

92-
Singleton.ts
85+
[Singleton.ts](src/singleton.ts)
9386

9487
```ts
9588
export default class Singleton {
@@ -142,3 +135,5 @@ console.log(singleton.getText, singleton2.getText); // I'm second. I'm second.
142135
## Strategy
143136

144137
## Template Method
138+
139+
## [Closure](src/closure/README.md)

โ€Žsrc/closure/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ class MakeCounter {
5757

5858
> Private method ๋Š” ๊ทธ๋ƒฅ class ์“ฐ๋ฉด ๋˜๋Š”๋ฐ ๊ตณ์ด ์‚ฌ์šฉํ•˜๋Š” ์ด์œ ๋Š” ๋ญ˜๊นŒ?
5959
60+
> > ์ž๋ฌธ์ž๋‹ต: ํด๋กœ์ €๋Š” ์Šค์ฝ”ํ”„ ๋ฌธ์ œ๋กœ ์‚ฌ์šฉํ•˜๋Š” ๊ฒฝ์šฐ๊ฐ€ ์žˆ์Œ. ํด๋กœ์ €๋ฅผ ์‚ฌ์šฉํ•˜์ง€ ์•Š์œผ๋ฉด ์ž๋ฐ”์Šคํฌ๋ฆฝํŠธ ๋ณ€์ˆ˜๊ฐ€ var๋กœ ์„ ์–ธ๋˜๊ฑฐ๋‚˜ function์ด ํŒŒ์ผ ์ „์ฒด์—์„œ ์ค‘๋ณต๋˜๋Š” ๋ฌธ์ œ๊ฐ€ ์ƒ๊ฒจ์„œ ์ด๋ฅผ ๋ฐฉ์ง€ํ•˜๊ธฐ ์œ„ํ•ด์„œ ํด๋กœ์ €๋ฅผ ์‚ฌ์šฉํ•จ.
61+
6062
์ฐธ๊ณ 
6163

6264
- https://medium.com/engineering-livestream/javascript-classes-vs-closures-cf6d6c1473f

0 commit comments

Comments
ย (0)