-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit 0241828
committed
refactor(project): convert finals to typescript
refactor(project): convert entry files to typescript
refactor(exercise-01): convert to typescript react
refactor(exercise-01): to ts: extra credit 1. accept the step as the action
refactor(exercise-01): to ts: extra credit 2. simulate setState with an object
refactor(exercise-01): to ts: extra credit 3. simulate setState with object|function
refactor(exercise-01): to ts: extra credit 4. traditional dispatch object
refactor(pokemon.js): to ts
refactor(exercise-02): to ts
refactor(exercise-02): to ts: extra credit 1: use useCallback
refactor(exercise-02): to ts: extra credit 2: return a memoized run function from useAsync
refactor(exercise-02): to ts: extra credit 3: make safeDispatch
refactor(final): move typescript final solution to `src/final-ts/`
refactor(exercise-03): to ts
refactor(exercise-03): to ts: extra credit 1: create a consumer hook
refactor(exercise-03): to ts: extra credit 2: caching in a context provider
refactor(exercise-04): to ts
refactor(exercise-05): to ts
refactor(exercise-06): to ts1 parent f1c3a20 commit 0241828
File tree
36 files changed
+2044
-134
lines changed- src
- __tests__
- exercise
- final-ts
- final
36 files changed
+2044
-134
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | - | ||
32 | + | ||
33 | + | ||
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
56 | - | ||
57 | + | ||
58 | + | ||
59 | + | ||
60 | + | ||
61 | + | ||
62 | + | ||
63 | + | ||
64 | + | ||
57 | 65 | | |
58 | 66 | | |
59 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | - | ||
5 | + | ||
6 | + | ||
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
14 | + | ||
15 | + | ||
16 | + | ||
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
| |||
Lines changed: 11 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | + | ||
6 | 7 | | |
7 | 8 | | |
9 | + | ||
10 | + | ||
11 | + | ||
8 | 12 | | |
9 | - | ||
10 | - | ||
13 | + | ||
14 | + | ||
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
14 | - | ||
15 | - | ||
18 | + | ||
19 | + | ||
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
| |||
34 | 38 | | |
35 | 39 | | |
36 | 40 | | |
37 | - | ||
41 | + | ||
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
| |||
46 | 50 | | |
47 | 51 | | |
48 | 52 | | |
49 | - | ||
53 | + | ||
50 | 54 | | |
51 | 55 | | |
52 | 56 | | |
| |||
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
59 | - | ||
63 | + | ||
60 | 64 | | |
61 | 65 | | |
62 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | - | ||
5 | + | ||
6 | + | ||
6 | 7 | | |
7 | 8 | | |
9 | + | ||
10 | + | ||
11 | + | ||
8 | 12 | | |
9 | - | ||
10 | - | ||
13 | + | ||
14 | + | ||
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
14 | - | ||
15 | - | ||
18 | + | ||
19 | + | ||
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
| |||
34 | 38 | | |
35 | 39 | | |
36 | 40 | | |
37 | - | ||
41 | + | ||
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
| |||
46 | 50 | | |
47 | 51 | | |
48 | 52 | | |
49 | - | ||
53 | + | ||
50 | 54 | | |
51 | 55 | | |
52 | 56 | | |
| |||
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
59 | - | ||
63 | + | ||
60 | 64 | | |
Lines changed: 12 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | + | ||
6 | 7 | | |
7 | 8 | | |
9 | + | ||
10 | + | ||
11 | + | ||
8 | 12 | | |
9 | - | ||
10 | - | ||
13 | + | ||
14 | + | ||
11 | 15 | | |
12 | 16 | | |
13 | 17 | | |
14 | - | ||
15 | - | ||
18 | + | ||
19 | + | ||
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
| |||
34 | 38 | | |
35 | 39 | | |
36 | 40 | | |
37 | - | ||
41 | + | ||
38 | 42 | | |
39 | 43 | | |
40 | 44 | | |
| |||
46 | 50 | | |
47 | 51 | | |
48 | 52 | | |
49 | - | ||
53 | + | ||
50 | 54 | | |
51 | 55 | | |
52 | 56 | | |
| |||
56 | 60 | | |
57 | 61 | | |
58 | 62 | | |
59 | - | ||
60 | - | ||
63 | + | ||
64 | + | ||
61 | 65 | | |
62 | 66 | | |
63 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | + | ||
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | + | ||
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | - | ||
28 | + | ||
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | - | ||
33 | + | ||
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | + | ||
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | + | ||
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
0 commit comments