├── .gitignore ├── README.md ├── chapter2 ├── .codesandbox │ └── workspace.json ├── index.html ├── package.json ├── src │ ├── clip3-1.ts │ ├── clip3-2.ts │ ├── clip4.ts │ ├── clip6.ts │ ├── clip7.ts │ └── index.ts └── tsconfig.json ├── chapter3 ├── .codesandbox │ └── workspace.json ├── clip7-1.txt ├── clip7-2.txt ├── index.html ├── package.json ├── src │ ├── cart.ts │ ├── clip4.ts │ ├── clip5.ts │ ├── clip6.ts │ ├── clip7.ts │ ├── clip8.ts │ ├── clip9.ts │ ├── index.css │ └── index.ts └── tsconfig.json ├── chapter4 ├── .codesandbox │ └── workspace.json ├── index.html ├── package.json ├── src │ ├── cart.ts │ ├── clip4.ts │ ├── clip5.ts │ ├── clip8.ts │ ├── index.css │ ├── index.ts │ ├── option.ts │ └── test.ts └── tsconfig.json ├── chapter5 ├── .codesandbox │ └── workspace.json ├── index.html ├── package.json ├── src │ ├── clip3-partial-application.ts │ ├── clip3.ts │ ├── clip4.ts │ ├── clip5.ts │ ├── compose.ts │ ├── index.ts │ ├── option.ts │ └── styles.css └── tsconfig.json ├── chapter6 ├── .codesandbox │ └── workspace.json ├── index.html ├── package.json ├── src │ ├── cart.ts │ ├── clip5.ts │ ├── clip8-original.ts │ ├── clip8.ts │ ├── index.css │ ├── index.ts │ ├── option.ts │ └── try.ts └── tsconfig.json ├── chapter7 ├── .codesandbox │ └── workspace.json ├── index.html ├── package.json ├── src │ ├── clip3.ts │ ├── clip4.ts │ ├── clip5.ts │ ├── clip6.ts │ ├── clip7.ts │ ├── clip8-1.ts │ ├── clip8-2.ts │ ├── index.ts │ ├── styles.css │ └── try.ts └── tsconfig.json ├── chapter8-clip8 ├── .codesandbox │ └── workspace.json ├── index.html ├── package.json ├── src │ ├── cart.ts │ ├── clip7.ts │ ├── index.css │ ├── index.ts │ ├── option.ts │ ├── renderButtons.ts │ ├── renderList.ts │ ├── styles.css │ └── try.ts └── tsconfig.json ├── chapter8 ├── .codesandbox │ └── workspace.json ├── index.html ├── package.json ├── src │ ├── cart.ts │ ├── clip3.ts │ ├── clip4.ts │ ├── clip5-1.ts │ ├── clip5-2.ts │ ├── clip6.ts │ ├── index.css │ ├── index.ts │ ├── option.ts │ ├── styles.css │ └── try.ts └── tsconfig.json └── chapter9 ├── .codesandbox └── workspace.json ├── index.html ├── package.json ├── src ├── clip3-complete.ts ├── clip3.ts ├── index.css ├── index.ts ├── option.ts ├── styles.css └── try.ts └── tsconfig.json /.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Created by https://www.toptal.com/developers/gitignore/api/vim,visualstudiocode,osx,windows,linux,node 3 | # Edit at https://www.toptal.com/developers/gitignore?templates=vim,visualstudiocode,osx,windows,linux,node 4 | 5 | ### Linux ### 6 | *~ 7 | 8 | # temporary files which can be created if a process still has a handle open of a deleted file 9 | .fuse_hidden* 10 | 11 | # KDE directory preferences 12 | .directory 13 | 14 | # Linux trash folder which might appear on any partition or disk 15 | .Trash-* 16 | 17 | # .nfs files are created when an open file is removed but is still being accessed 18 | .nfs* 19 | 20 | ### Node ### 21 | # Logs 22 | logs 23 | *.log 24 | npm-debug.log* 25 | yarn-debug.log* 26 | yarn-error.log* 27 | lerna-debug.log* 28 | .pnpm-debug.log* 29 | 30 | # Diagnostic reports (https://nodejs.org/api/report.html) 31 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 32 | 33 | # Runtime data 34 | pids 35 | *.pid 36 | *.seed 37 | *.pid.lock 38 | 39 | # Directory for instrumented libs generated by jscoverage/JSCover 40 | lib-cov 41 | 42 | # Coverage directory used by tools like istanbul 43 | coverage 44 | *.lcov 45 | 46 | # nyc test coverage 47 | .nyc_output 48 | 49 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 50 | .grunt 51 | 52 | # Bower dependency directory (https://bower.io/) 53 | bower_components 54 | 55 | # node-waf configuration 56 | .lock-wscript 57 | 58 | # Compiled binary addons (https://nodejs.org/api/addons.html) 59 | build/Release 60 | 61 | # Dependency directories 62 | node_modules/ 63 | jspm_packages/ 64 | 65 | # Snowpack dependency directory (https://snowpack.dev/) 66 | web_modules/ 67 | 68 | # TypeScript cache 69 | *.tsbuildinfo 70 | 71 | # Optional npm cache directory 72 | .npm 73 | 74 | # Optional eslint cache 75 | .eslintcache 76 | 77 | # Microbundle cache 78 | .rpt2_cache/ 79 | .rts2_cache_cjs/ 80 | .rts2_cache_es/ 81 | .rts2_cache_umd/ 82 | 83 | # Optional REPL history 84 | .node_repl_history 85 | 86 | # Output of 'npm pack' 87 | *.tgz 88 | 89 | # Yarn Integrity file 90 | .yarn-integrity 91 | 92 | # dotenv environment variables file 93 | .env 94 | .env.test 95 | .env.production 96 | 97 | # parcel-bundler cache (https://parceljs.org/) 98 | .cache 99 | .parcel-cache 100 | 101 | # Next.js build output 102 | .next 103 | out 104 | 105 | # Nuxt.js build / generate output 106 | .nuxt 107 | dist 108 | 109 | # Gatsby files 110 | .cache/ 111 | # Comment in the public line in if your project uses Gatsby and not Next.js 112 | # https://nextjs.org/blog/next-9-1#public-directory-support 113 | # public 114 | 115 | # vuepress build output 116 | .vuepress/dist 117 | 118 | # Serverless directories 119 | .serverless/ 120 | 121 | # FuseBox cache 122 | .fusebox/ 123 | 124 | # DynamoDB Local files 125 | .dynamodb/ 126 | 127 | # TernJS port file 128 | .tern-port 129 | 130 | # Stores VSCode versions used for testing VSCode extensions 131 | .vscode-test 132 | 133 | # yarn v2 134 | .yarn/cache 135 | .yarn/unplugged 136 | .yarn/build-state.yml 137 | .yarn/install-state.gz 138 | .pnp.* 139 | 140 | ### Node Patch ### 141 | # Serverless Webpack directories 142 | .webpack/ 143 | 144 | # Optional stylelint cache 145 | .stylelintcache 146 | 147 | # SvelteKit build / generate output 148 | .svelte-kit 149 | 150 | ### OSX ### 151 | # General 152 | .DS_Store 153 | .AppleDouble 154 | .LSOverride 155 | 156 | # Icon must end with two \r 157 | Icon 158 | 159 | 160 | # Thumbnails 161 | ._* 162 | 163 | # Files that might appear in the root of a volume 164 | .DocumentRevisions-V100 165 | .fseventsd 166 | .Spotlight-V100 167 | .TemporaryItems 168 | .Trashes 169 | .VolumeIcon.icns 170 | .com.apple.timemachine.donotpresent 171 | 172 | # Directories potentially created on remote AFP share 173 | .AppleDB 174 | .AppleDesktop 175 | Network Trash Folder 176 | Temporary Items 177 | .apdisk 178 | 179 | ### Vim ### 180 | # Swap 181 | [._]*.s[a-v][a-z] 182 | !*.svg # comment out if you don't need vector files 183 | [._]*.sw[a-p] 184 | [._]s[a-rt-v][a-z] 185 | [._]ss[a-gi-z] 186 | [._]sw[a-p] 187 | 188 | # Session 189 | Session.vim 190 | Sessionx.vim 191 | 192 | # Temporary 193 | .netrwhist 194 | # Auto-generated tag files 195 | tags 196 | # Persistent undo 197 | [._]*.un~ 198 | 199 | ### VisualStudioCode ### 200 | .vscode/* 201 | !.vscode/settings.json 202 | !.vscode/tasks.json 203 | !.vscode/launch.json 204 | !.vscode/extensions.json 205 | *.code-workspace 206 | 207 | # Local History for Visual Studio Code 208 | .history/ 209 | 210 | ### VisualStudioCode Patch ### 211 | # Ignore all local history of files 212 | .history 213 | .ionide 214 | 215 | # Support for Project snippet scope 216 | !.vscode/*.code-snippets 217 | 218 | ### Windows ### 219 | # Windows thumbnail cache files 220 | Thumbs.db 221 | Thumbs.db:encryptable 222 | ehthumbs.db 223 | ehthumbs_vista.db 224 | 225 | # Dump file 226 | *.stackdump 227 | 228 | # Folder config file 229 | [Dd]esktop.ini 230 | 231 | # Recycle Bin used on file shares 232 | $RECYCLE.BIN/ 233 | 234 | # Windows Installer files 235 | *.cab 236 | *.msi 237 | *.msix 238 | *.msm 239 | *.msp 240 | 241 | # Windows shortcuts 242 | *.lnk 243 | 244 | # End of https://www.toptal.com/developers/gitignore/api/vim,visualstudiocode,osx,windows,linux,node 245 | 246 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Chapter 2 2 | [codesandbox로 열기](https://codesandbox.io/s/github/JsonKim/fastcampus-fp-typescript/tree/main/chapter2?file=/src/clip3-1.ts) 3 | 4 | ## Chapter 3 5 | [codesandbox로 열기](https://codesandbox.io/s/github/JsonKim/fastcampus-fp-typescript/tree/main/chapter3?file=/src/clip4.ts) 6 | 7 | ## Chapter 4 8 | [codesandbox로 열기](https://codesandbox.io/s/github/JsonKim/fastcampus-fp-typescript/tree/main/chapter4?file=/src/clip4.ts) 9 | 10 | ## Chapter 5 11 | [codesandbox로 열기](https://codesandbox.io/s/github/JsonKim/fastcampus-fp-typescript/tree/main/chapter5?file=/src/clip3.ts) 12 | 13 | ## Chapter 6 14 | [codesandbox로 열기](https://codesandbox.io/s/github/JsonKim/fastcampus-fp-typescript/tree/main/chapter6?file=/src/clip5.ts) 15 | 16 | ## Chapter 7 17 | [codesandbox로 열기](https://codesandbox.io/s/github/JsonKim/fastcampus-fp-typescript/tree/main/chapter7?file=/src/clip3.ts) 18 | 19 | ## Chapter 8 20 | [codesandbox로 열기](https://codesandbox.io/s/github/JsonKim/fastcampus-fp-typescript/tree/main/chapter8?file=/src/clip3.ts) 21 | 22 | ## Chapter 8 - Clip 8 23 | [codesandbox로 열기](https://codesandbox.io/s/github/JsonKim/fastcampus-fp-typescript/tree/main/chapter8-clip8?file=/src/renderButtons.ts) 24 | 25 | ## Chapter 9 26 | [codesandbox로 열기](https://codesandbox.io/s/github/JsonKim/fastcampus-fp-typescript/tree/main/chapter8-clip8?file=/src/clip3.ts) 27 | 28 | -------------------------------------------------------------------------------- /chapter2/.codesandbox/workspace.json: -------------------------------------------------------------------------------- 1 | { 2 | "responsive-preview": { 3 | "Mobile": [ 4 | 320, 5 | 675 6 | ], 7 | "Tablet": [ 8 | 1024, 9 | 765 10 | ], 11 | "Desktop": [ 12 | 1400, 13 | 800 14 | ], 15 | "Desktop HD": [ 16 | 1920, 17 | 1080 18 | ] 19 | } 20 | } -------------------------------------------------------------------------------- /chapter2/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |${JSON.stringify(cards2, null, 2)} 50 |51 | `; 52 | }; 53 | -------------------------------------------------------------------------------- /chapter3/src/index.css: -------------------------------------------------------------------------------- 1 | .gray { 2 | color: gray; 3 | } 4 | 5 | .strike { 6 | text-decoration: line-through; 7 | } 8 | -------------------------------------------------------------------------------- /chapter3/src/index.ts: -------------------------------------------------------------------------------- 1 | import "./clip4"; 2 | -------------------------------------------------------------------------------- /chapter3/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "strict": true, 4 | "module": "commonjs", 5 | "jsx": "preserve", 6 | "esModuleInterop": true, 7 | "sourceMap": true, 8 | "allowJs": true, 9 | "lib": [ 10 | "esnext", 11 | "dom" 12 | ], 13 | "rootDir": "src", 14 | "moduleResolution": "node" 15 | } 16 | } -------------------------------------------------------------------------------- /chapter4/.codesandbox/workspace.json: -------------------------------------------------------------------------------- 1 | { 2 | "responsive-preview": { 3 | "Mobile": [ 4 | 320, 5 | 675 6 | ], 7 | "Tablet": [ 8 | 1024, 9 | 765 10 | ], 11 | "Desktop": [ 12 | 1400, 13 | 800 14 | ], 15 | "Desktop HD": [ 16 | 1920, 17 | 1080 18 | ] 19 | } 20 | } -------------------------------------------------------------------------------- /chapter4/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 |