├── .eslintrc ├── .flowconfig ├── .gitignore ├── .travis.yml ├── README.md ├── flow-typed └── npm │ ├── flow-bin_v0.x.x.js │ ├── flow-coverage-report_vx.x.x.js │ ├── husky_vx.x.x.js │ ├── lint-staged_vx.x.x.js │ ├── prettier_vx.x.x.js │ ├── ramda_v0.x.x.js │ ├── react-redux_v5.x.x.js │ ├── react-router-dom_vx.x.x.js │ ├── react-router_vx.x.x.js │ ├── react-scripts_vx.x.x.js │ ├── redux-saga-test-engine_vx.x.x.js │ ├── redux-saga_vx.x.x.js │ └── redux_v3.x.x.js ├── package.json ├── public ├── favicon.ico ├── index.html └── manifest.json ├── src ├── App.js ├── components │ ├── LandingPage.js │ ├── NoMatch.js │ └── Routes.js ├── configureStore.js ├── index.html ├── index.js ├── quiz │ ├── __tests__ │ │ ├── __snapshots__ │ │ │ └── quizReducer.test.js.snap │ │ └── quizReducer.test.js │ ├── components │ │ ├── Choice.js │ │ ├── Question.js │ │ └── Quiz.js │ ├── containers │ │ └── QuizContainer.js │ ├── quizActions.js │ ├── quizReducer.js │ └── quizSelectors.js ├── quizJSON.js ├── registerServiceWorker.js ├── rootReducer.js ├── sagas │ ├── __tests__ │ │ └── fetchQuizSaga.test.js │ └── fetchQuizSaga.js ├── services │ └── quizService.js └── types │ ├── TypeAction.flow.js │ ├── TypeQuiz.flow.js │ └── TypeStore.flow.js ├── todo.txt └── yarn.lock /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "react-app" 3 | } 4 | -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | .*/node_modules/styled-components/src/.* 3 | 4 | [include] 5 | 6 | [libs] 7 | 8 | [lints] 9 | 10 | [options] 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | /build 11 | 12 | # misc 13 | .DS_Store 14 | .env.local 15 | .env.development.local 16 | .env.test.local 17 | .env.production.local 18 | 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "8.4.0" 4 | cache: 5 | yarn: true 6 | directories: 7 | - node_modules 8 | script: "yarn run ci" 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Quiz Simply 2 | https://www.quiz-simply.now.sh 3 | 4 | ## How to Use This Repo 5 | 6 | Development build: `yarn start` 7 | 8 | Production build: `yarn run build` 9 | 10 | Run tests: `yarn test` 11 | 12 | Run Flow: `yarn run flow` 13 | 14 | Run Flow, build app (for eslint), and run tests: `yarn run ci` 15 | 16 | This project uses prettier. It will run automatically before a commit -------------------------------------------------------------------------------- /flow-typed/npm/flow-bin_v0.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 6a5610678d4b01e13bbfbbc62bdaf583 2 | // flow-typed version: 3817bc6980/flow-bin_v0.x.x/flow_>=v0.25.x 3 | 4 | declare module "flow-bin" { 5 | declare module.exports: string; 6 | } 7 | -------------------------------------------------------------------------------- /flow-typed/npm/flow-coverage-report_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 5994e00e50c20807e9b53c3f8d602412 2 | // flow-typed version: <>/flow-coverage-report_v^0.3.0/flow_v0.53.1 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'flow-coverage-report' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'flow-coverage-report' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'flow-coverage-report/assets/codemirror-annotatescrollbar-addon' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'flow-coverage-report/assets/codemirror-javascript-mode' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'flow-coverage-report/assets/codemirror-simplescrollbars-addon' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'flow-coverage-report/assets/codemirror' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'flow-coverage-report/assets/flow-highlight-source' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'flow-coverage-report/assets/index' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'flow-coverage-report/assets/jquery-3.1.0.min' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'flow-coverage-report/assets/semantic-tablesort' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'flow-coverage-report/assets/semantic.min' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'flow-coverage-report/bin/flow-coverage-report' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'flow-coverage-report/dist/lib/cli/args' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'flow-coverage-report/dist/lib/cli/config' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'flow-coverage-report/dist/lib/cli/index' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'flow-coverage-report/dist/lib/components/body-coverage-sourcefile' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'flow-coverage-report/dist/lib/components/body-coverage-summary' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'flow-coverage-report/dist/lib/components/coverage-file-table-head' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'flow-coverage-report/dist/lib/components/coverage-file-table-row' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'flow-coverage-report/dist/lib/components/coverage-meter-bar' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'flow-coverage-report/dist/lib/components/coverage-summary-table' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'flow-coverage-report/dist/lib/components/footer' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module 'flow-coverage-report/dist/lib/components/head' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module 'flow-coverage-report/dist/lib/components/html-report-page' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module 'flow-coverage-report/dist/lib/flow' { 114 | declare module.exports: any; 115 | } 116 | 117 | declare module 'flow-coverage-report/dist/lib/index' { 118 | declare module.exports: any; 119 | } 120 | 121 | declare module 'flow-coverage-report/dist/lib/promisified' { 122 | declare module.exports: any; 123 | } 124 | 125 | declare module 'flow-coverage-report/dist/lib/report-html' { 126 | declare module.exports: any; 127 | } 128 | 129 | declare module 'flow-coverage-report/dist/lib/report-json' { 130 | declare module.exports: any; 131 | } 132 | 133 | declare module 'flow-coverage-report/dist/lib/report-text' { 134 | declare module.exports: any; 135 | } 136 | 137 | declare module 'flow-coverage-report/dist/test/unit/fixtures' { 138 | declare module.exports: any; 139 | } 140 | 141 | declare module 'flow-coverage-report/dist/test/unit/test-flow' { 142 | declare module.exports: any; 143 | } 144 | 145 | declare module 'flow-coverage-report/dist/test/unit/test-index' { 146 | declare module.exports: any; 147 | } 148 | 149 | declare module 'flow-coverage-report/dist/test/unit/test-package-index' { 150 | declare module.exports: any; 151 | } 152 | 153 | declare module 'flow-coverage-report/dist/test/unit/test-promisified/test-exec' { 154 | declare module.exports: any; 155 | } 156 | 157 | declare module 'flow-coverage-report/dist/test/unit/test-promisified/test-file' { 158 | declare module.exports: any; 159 | } 160 | 161 | declare module 'flow-coverage-report/dist/test/unit/test-promisified/test-glob' { 162 | declare module.exports: any; 163 | } 164 | 165 | declare module 'flow-coverage-report/dist/test/unit/test-promisified/test-mkdirp' { 166 | declare module.exports: any; 167 | } 168 | 169 | declare module 'flow-coverage-report/dist/test/unit/test-react-components/common' { 170 | declare module.exports: any; 171 | } 172 | 173 | declare module 'flow-coverage-report/dist/test/unit/test-react-components/test-body-coverage-sourcefile' { 174 | declare module.exports: any; 175 | } 176 | 177 | declare module 'flow-coverage-report/dist/test/unit/test-react-components/test-body-coverage-summary' { 178 | declare module.exports: any; 179 | } 180 | 181 | declare module 'flow-coverage-report/dist/test/unit/test-react-components/test-coverage-file-table-head' { 182 | declare module.exports: any; 183 | } 184 | 185 | declare module 'flow-coverage-report/dist/test/unit/test-react-components/test-coverage-file-table-row' { 186 | declare module.exports: any; 187 | } 188 | 189 | declare module 'flow-coverage-report/dist/test/unit/test-react-components/test-coverage-meter-bar' { 190 | declare module.exports: any; 191 | } 192 | 193 | declare module 'flow-coverage-report/dist/test/unit/test-react-components/test-coverage-summary-table' { 194 | declare module.exports: any; 195 | } 196 | 197 | declare module 'flow-coverage-report/dist/test/unit/test-react-components/test-footer' { 198 | declare module.exports: any; 199 | } 200 | 201 | declare module 'flow-coverage-report/dist/test/unit/test-react-components/test-head' { 202 | declare module.exports: any; 203 | } 204 | 205 | declare module 'flow-coverage-report/dist/test/unit/test-react-components/test-html-report-page' { 206 | declare module.exports: any; 207 | } 208 | 209 | declare module 'flow-coverage-report/dist/test/unit/test-report-html' { 210 | declare module.exports: any; 211 | } 212 | 213 | declare module 'flow-coverage-report/dist/test/unit/test-report-json' { 214 | declare module.exports: any; 215 | } 216 | 217 | declare module 'flow-coverage-report/dist/test/unit/test-report-text' { 218 | declare module.exports: any; 219 | } 220 | 221 | declare module 'flow-coverage-report/src/lib/cli/args' { 222 | declare module.exports: any; 223 | } 224 | 225 | declare module 'flow-coverage-report/src/lib/cli/config' { 226 | declare module.exports: any; 227 | } 228 | 229 | declare module 'flow-coverage-report/src/lib/cli/index' { 230 | declare module.exports: any; 231 | } 232 | 233 | declare module 'flow-coverage-report/src/lib/components/body-coverage-sourcefile' { 234 | declare module.exports: any; 235 | } 236 | 237 | declare module 'flow-coverage-report/src/lib/components/body-coverage-summary' { 238 | declare module.exports: any; 239 | } 240 | 241 | declare module 'flow-coverage-report/src/lib/components/coverage-file-table-head' { 242 | declare module.exports: any; 243 | } 244 | 245 | declare module 'flow-coverage-report/src/lib/components/coverage-file-table-row' { 246 | declare module.exports: any; 247 | } 248 | 249 | declare module 'flow-coverage-report/src/lib/components/coverage-meter-bar' { 250 | declare module.exports: any; 251 | } 252 | 253 | declare module 'flow-coverage-report/src/lib/components/coverage-summary-table' { 254 | declare module.exports: any; 255 | } 256 | 257 | declare module 'flow-coverage-report/src/lib/components/footer' { 258 | declare module.exports: any; 259 | } 260 | 261 | declare module 'flow-coverage-report/src/lib/components/head' { 262 | declare module.exports: any; 263 | } 264 | 265 | declare module 'flow-coverage-report/src/lib/components/html-report-page' { 266 | declare module.exports: any; 267 | } 268 | 269 | declare module 'flow-coverage-report/src/lib/flow' { 270 | declare module.exports: any; 271 | } 272 | 273 | declare module 'flow-coverage-report/src/lib/index' { 274 | declare module.exports: any; 275 | } 276 | 277 | declare module 'flow-coverage-report/src/lib/promisified' { 278 | declare module.exports: any; 279 | } 280 | 281 | declare module 'flow-coverage-report/src/lib/report-html' { 282 | declare module.exports: any; 283 | } 284 | 285 | declare module 'flow-coverage-report/src/lib/report-json' { 286 | declare module.exports: any; 287 | } 288 | 289 | declare module 'flow-coverage-report/src/lib/report-text' { 290 | declare module.exports: any; 291 | } 292 | 293 | declare module 'flow-coverage-report/src/test/unit/fixtures' { 294 | declare module.exports: any; 295 | } 296 | 297 | declare module 'flow-coverage-report/src/test/unit/test-flow' { 298 | declare module.exports: any; 299 | } 300 | 301 | declare module 'flow-coverage-report/src/test/unit/test-index' { 302 | declare module.exports: any; 303 | } 304 | 305 | declare module 'flow-coverage-report/src/test/unit/test-package-index' { 306 | declare module.exports: any; 307 | } 308 | 309 | declare module 'flow-coverage-report/src/test/unit/test-promisified/test-exec' { 310 | declare module.exports: any; 311 | } 312 | 313 | declare module 'flow-coverage-report/src/test/unit/test-promisified/test-file' { 314 | declare module.exports: any; 315 | } 316 | 317 | declare module 'flow-coverage-report/src/test/unit/test-promisified/test-glob' { 318 | declare module.exports: any; 319 | } 320 | 321 | declare module 'flow-coverage-report/src/test/unit/test-promisified/test-mkdirp' { 322 | declare module.exports: any; 323 | } 324 | 325 | declare module 'flow-coverage-report/src/test/unit/test-react-components/common' { 326 | declare module.exports: any; 327 | } 328 | 329 | declare module 'flow-coverage-report/src/test/unit/test-react-components/test-body-coverage-sourcefile' { 330 | declare module.exports: any; 331 | } 332 | 333 | declare module 'flow-coverage-report/src/test/unit/test-react-components/test-body-coverage-summary' { 334 | declare module.exports: any; 335 | } 336 | 337 | declare module 'flow-coverage-report/src/test/unit/test-react-components/test-coverage-file-table-head' { 338 | declare module.exports: any; 339 | } 340 | 341 | declare module 'flow-coverage-report/src/test/unit/test-react-components/test-coverage-file-table-row' { 342 | declare module.exports: any; 343 | } 344 | 345 | declare module 'flow-coverage-report/src/test/unit/test-react-components/test-coverage-meter-bar' { 346 | declare module.exports: any; 347 | } 348 | 349 | declare module 'flow-coverage-report/src/test/unit/test-react-components/test-coverage-summary-table' { 350 | declare module.exports: any; 351 | } 352 | 353 | declare module 'flow-coverage-report/src/test/unit/test-react-components/test-footer' { 354 | declare module.exports: any; 355 | } 356 | 357 | declare module 'flow-coverage-report/src/test/unit/test-react-components/test-head' { 358 | declare module.exports: any; 359 | } 360 | 361 | declare module 'flow-coverage-report/src/test/unit/test-react-components/test-html-report-page' { 362 | declare module.exports: any; 363 | } 364 | 365 | declare module 'flow-coverage-report/src/test/unit/test-report-html' { 366 | declare module.exports: any; 367 | } 368 | 369 | declare module 'flow-coverage-report/src/test/unit/test-report-json' { 370 | declare module.exports: any; 371 | } 372 | 373 | declare module 'flow-coverage-report/src/test/unit/test-report-text' { 374 | declare module.exports: any; 375 | } 376 | 377 | // Filename aliases 378 | declare module 'flow-coverage-report/assets/codemirror-annotatescrollbar-addon.js' { 379 | declare module.exports: $Exports<'flow-coverage-report/assets/codemirror-annotatescrollbar-addon'>; 380 | } 381 | declare module 'flow-coverage-report/assets/codemirror-javascript-mode.js' { 382 | declare module.exports: $Exports<'flow-coverage-report/assets/codemirror-javascript-mode'>; 383 | } 384 | declare module 'flow-coverage-report/assets/codemirror-simplescrollbars-addon.js' { 385 | declare module.exports: $Exports<'flow-coverage-report/assets/codemirror-simplescrollbars-addon'>; 386 | } 387 | declare module 'flow-coverage-report/assets/codemirror.js' { 388 | declare module.exports: $Exports<'flow-coverage-report/assets/codemirror'>; 389 | } 390 | declare module 'flow-coverage-report/assets/flow-highlight-source.js' { 391 | declare module.exports: $Exports<'flow-coverage-report/assets/flow-highlight-source'>; 392 | } 393 | declare module 'flow-coverage-report/assets/index.js' { 394 | declare module.exports: $Exports<'flow-coverage-report/assets/index'>; 395 | } 396 | declare module 'flow-coverage-report/assets/jquery-3.1.0.min.js' { 397 | declare module.exports: $Exports<'flow-coverage-report/assets/jquery-3.1.0.min'>; 398 | } 399 | declare module 'flow-coverage-report/assets/semantic-tablesort.js' { 400 | declare module.exports: $Exports<'flow-coverage-report/assets/semantic-tablesort'>; 401 | } 402 | declare module 'flow-coverage-report/assets/semantic.min.js' { 403 | declare module.exports: $Exports<'flow-coverage-report/assets/semantic.min'>; 404 | } 405 | declare module 'flow-coverage-report/bin/flow-coverage-report.js' { 406 | declare module.exports: $Exports<'flow-coverage-report/bin/flow-coverage-report'>; 407 | } 408 | declare module 'flow-coverage-report/dist/lib/cli/args.js' { 409 | declare module.exports: $Exports<'flow-coverage-report/dist/lib/cli/args'>; 410 | } 411 | declare module 'flow-coverage-report/dist/lib/cli/config.js' { 412 | declare module.exports: $Exports<'flow-coverage-report/dist/lib/cli/config'>; 413 | } 414 | declare module 'flow-coverage-report/dist/lib/cli/index.js' { 415 | declare module.exports: $Exports<'flow-coverage-report/dist/lib/cli/index'>; 416 | } 417 | declare module 'flow-coverage-report/dist/lib/components/body-coverage-sourcefile.js' { 418 | declare module.exports: $Exports<'flow-coverage-report/dist/lib/components/body-coverage-sourcefile'>; 419 | } 420 | declare module 'flow-coverage-report/dist/lib/components/body-coverage-summary.js' { 421 | declare module.exports: $Exports<'flow-coverage-report/dist/lib/components/body-coverage-summary'>; 422 | } 423 | declare module 'flow-coverage-report/dist/lib/components/coverage-file-table-head.js' { 424 | declare module.exports: $Exports<'flow-coverage-report/dist/lib/components/coverage-file-table-head'>; 425 | } 426 | declare module 'flow-coverage-report/dist/lib/components/coverage-file-table-row.js' { 427 | declare module.exports: $Exports<'flow-coverage-report/dist/lib/components/coverage-file-table-row'>; 428 | } 429 | declare module 'flow-coverage-report/dist/lib/components/coverage-meter-bar.js' { 430 | declare module.exports: $Exports<'flow-coverage-report/dist/lib/components/coverage-meter-bar'>; 431 | } 432 | declare module 'flow-coverage-report/dist/lib/components/coverage-summary-table.js' { 433 | declare module.exports: $Exports<'flow-coverage-report/dist/lib/components/coverage-summary-table'>; 434 | } 435 | declare module 'flow-coverage-report/dist/lib/components/footer.js' { 436 | declare module.exports: $Exports<'flow-coverage-report/dist/lib/components/footer'>; 437 | } 438 | declare module 'flow-coverage-report/dist/lib/components/head.js' { 439 | declare module.exports: $Exports<'flow-coverage-report/dist/lib/components/head'>; 440 | } 441 | declare module 'flow-coverage-report/dist/lib/components/html-report-page.js' { 442 | declare module.exports: $Exports<'flow-coverage-report/dist/lib/components/html-report-page'>; 443 | } 444 | declare module 'flow-coverage-report/dist/lib/flow.js' { 445 | declare module.exports: $Exports<'flow-coverage-report/dist/lib/flow'>; 446 | } 447 | declare module 'flow-coverage-report/dist/lib/index.js' { 448 | declare module.exports: $Exports<'flow-coverage-report/dist/lib/index'>; 449 | } 450 | declare module 'flow-coverage-report/dist/lib/promisified.js' { 451 | declare module.exports: $Exports<'flow-coverage-report/dist/lib/promisified'>; 452 | } 453 | declare module 'flow-coverage-report/dist/lib/report-html.js' { 454 | declare module.exports: $Exports<'flow-coverage-report/dist/lib/report-html'>; 455 | } 456 | declare module 'flow-coverage-report/dist/lib/report-json.js' { 457 | declare module.exports: $Exports<'flow-coverage-report/dist/lib/report-json'>; 458 | } 459 | declare module 'flow-coverage-report/dist/lib/report-text.js' { 460 | declare module.exports: $Exports<'flow-coverage-report/dist/lib/report-text'>; 461 | } 462 | declare module 'flow-coverage-report/dist/test/unit/fixtures.js' { 463 | declare module.exports: $Exports<'flow-coverage-report/dist/test/unit/fixtures'>; 464 | } 465 | declare module 'flow-coverage-report/dist/test/unit/test-flow.js' { 466 | declare module.exports: $Exports<'flow-coverage-report/dist/test/unit/test-flow'>; 467 | } 468 | declare module 'flow-coverage-report/dist/test/unit/test-index.js' { 469 | declare module.exports: $Exports<'flow-coverage-report/dist/test/unit/test-index'>; 470 | } 471 | declare module 'flow-coverage-report/dist/test/unit/test-package-index.js' { 472 | declare module.exports: $Exports<'flow-coverage-report/dist/test/unit/test-package-index'>; 473 | } 474 | declare module 'flow-coverage-report/dist/test/unit/test-promisified/test-exec.js' { 475 | declare module.exports: $Exports<'flow-coverage-report/dist/test/unit/test-promisified/test-exec'>; 476 | } 477 | declare module 'flow-coverage-report/dist/test/unit/test-promisified/test-file.js' { 478 | declare module.exports: $Exports<'flow-coverage-report/dist/test/unit/test-promisified/test-file'>; 479 | } 480 | declare module 'flow-coverage-report/dist/test/unit/test-promisified/test-glob.js' { 481 | declare module.exports: $Exports<'flow-coverage-report/dist/test/unit/test-promisified/test-glob'>; 482 | } 483 | declare module 'flow-coverage-report/dist/test/unit/test-promisified/test-mkdirp.js' { 484 | declare module.exports: $Exports<'flow-coverage-report/dist/test/unit/test-promisified/test-mkdirp'>; 485 | } 486 | declare module 'flow-coverage-report/dist/test/unit/test-react-components/common.js' { 487 | declare module.exports: $Exports<'flow-coverage-report/dist/test/unit/test-react-components/common'>; 488 | } 489 | declare module 'flow-coverage-report/dist/test/unit/test-react-components/test-body-coverage-sourcefile.js' { 490 | declare module.exports: $Exports<'flow-coverage-report/dist/test/unit/test-react-components/test-body-coverage-sourcefile'>; 491 | } 492 | declare module 'flow-coverage-report/dist/test/unit/test-react-components/test-body-coverage-summary.js' { 493 | declare module.exports: $Exports<'flow-coverage-report/dist/test/unit/test-react-components/test-body-coverage-summary'>; 494 | } 495 | declare module 'flow-coverage-report/dist/test/unit/test-react-components/test-coverage-file-table-head.js' { 496 | declare module.exports: $Exports<'flow-coverage-report/dist/test/unit/test-react-components/test-coverage-file-table-head'>; 497 | } 498 | declare module 'flow-coverage-report/dist/test/unit/test-react-components/test-coverage-file-table-row.js' { 499 | declare module.exports: $Exports<'flow-coverage-report/dist/test/unit/test-react-components/test-coverage-file-table-row'>; 500 | } 501 | declare module 'flow-coverage-report/dist/test/unit/test-react-components/test-coverage-meter-bar.js' { 502 | declare module.exports: $Exports<'flow-coverage-report/dist/test/unit/test-react-components/test-coverage-meter-bar'>; 503 | } 504 | declare module 'flow-coverage-report/dist/test/unit/test-react-components/test-coverage-summary-table.js' { 505 | declare module.exports: $Exports<'flow-coverage-report/dist/test/unit/test-react-components/test-coverage-summary-table'>; 506 | } 507 | declare module 'flow-coverage-report/dist/test/unit/test-react-components/test-footer.js' { 508 | declare module.exports: $Exports<'flow-coverage-report/dist/test/unit/test-react-components/test-footer'>; 509 | } 510 | declare module 'flow-coverage-report/dist/test/unit/test-react-components/test-head.js' { 511 | declare module.exports: $Exports<'flow-coverage-report/dist/test/unit/test-react-components/test-head'>; 512 | } 513 | declare module 'flow-coverage-report/dist/test/unit/test-react-components/test-html-report-page.js' { 514 | declare module.exports: $Exports<'flow-coverage-report/dist/test/unit/test-react-components/test-html-report-page'>; 515 | } 516 | declare module 'flow-coverage-report/dist/test/unit/test-report-html.js' { 517 | declare module.exports: $Exports<'flow-coverage-report/dist/test/unit/test-report-html'>; 518 | } 519 | declare module 'flow-coverage-report/dist/test/unit/test-report-json.js' { 520 | declare module.exports: $Exports<'flow-coverage-report/dist/test/unit/test-report-json'>; 521 | } 522 | declare module 'flow-coverage-report/dist/test/unit/test-report-text.js' { 523 | declare module.exports: $Exports<'flow-coverage-report/dist/test/unit/test-report-text'>; 524 | } 525 | declare module 'flow-coverage-report/src/lib/cli/args.js' { 526 | declare module.exports: $Exports<'flow-coverage-report/src/lib/cli/args'>; 527 | } 528 | declare module 'flow-coverage-report/src/lib/cli/config.js' { 529 | declare module.exports: $Exports<'flow-coverage-report/src/lib/cli/config'>; 530 | } 531 | declare module 'flow-coverage-report/src/lib/cli/index.js' { 532 | declare module.exports: $Exports<'flow-coverage-report/src/lib/cli/index'>; 533 | } 534 | declare module 'flow-coverage-report/src/lib/components/body-coverage-sourcefile.jsx' { 535 | declare module.exports: $Exports<'flow-coverage-report/src/lib/components/body-coverage-sourcefile'>; 536 | } 537 | declare module 'flow-coverage-report/src/lib/components/body-coverage-summary.jsx' { 538 | declare module.exports: $Exports<'flow-coverage-report/src/lib/components/body-coverage-summary'>; 539 | } 540 | declare module 'flow-coverage-report/src/lib/components/coverage-file-table-head.jsx' { 541 | declare module.exports: $Exports<'flow-coverage-report/src/lib/components/coverage-file-table-head'>; 542 | } 543 | declare module 'flow-coverage-report/src/lib/components/coverage-file-table-row.jsx' { 544 | declare module.exports: $Exports<'flow-coverage-report/src/lib/components/coverage-file-table-row'>; 545 | } 546 | declare module 'flow-coverage-report/src/lib/components/coverage-meter-bar.jsx' { 547 | declare module.exports: $Exports<'flow-coverage-report/src/lib/components/coverage-meter-bar'>; 548 | } 549 | declare module 'flow-coverage-report/src/lib/components/coverage-summary-table.jsx' { 550 | declare module.exports: $Exports<'flow-coverage-report/src/lib/components/coverage-summary-table'>; 551 | } 552 | declare module 'flow-coverage-report/src/lib/components/footer.jsx' { 553 | declare module.exports: $Exports<'flow-coverage-report/src/lib/components/footer'>; 554 | } 555 | declare module 'flow-coverage-report/src/lib/components/head.jsx' { 556 | declare module.exports: $Exports<'flow-coverage-report/src/lib/components/head'>; 557 | } 558 | declare module 'flow-coverage-report/src/lib/components/html-report-page.jsx' { 559 | declare module.exports: $Exports<'flow-coverage-report/src/lib/components/html-report-page'>; 560 | } 561 | declare module 'flow-coverage-report/src/lib/flow.js' { 562 | declare module.exports: $Exports<'flow-coverage-report/src/lib/flow'>; 563 | } 564 | declare module 'flow-coverage-report/src/lib/index.js' { 565 | declare module.exports: $Exports<'flow-coverage-report/src/lib/index'>; 566 | } 567 | declare module 'flow-coverage-report/src/lib/promisified.js' { 568 | declare module.exports: $Exports<'flow-coverage-report/src/lib/promisified'>; 569 | } 570 | declare module 'flow-coverage-report/src/lib/report-html.js' { 571 | declare module.exports: $Exports<'flow-coverage-report/src/lib/report-html'>; 572 | } 573 | declare module 'flow-coverage-report/src/lib/report-json.js' { 574 | declare module.exports: $Exports<'flow-coverage-report/src/lib/report-json'>; 575 | } 576 | declare module 'flow-coverage-report/src/lib/report-text.js' { 577 | declare module.exports: $Exports<'flow-coverage-report/src/lib/report-text'>; 578 | } 579 | declare module 'flow-coverage-report/src/test/unit/fixtures.js' { 580 | declare module.exports: $Exports<'flow-coverage-report/src/test/unit/fixtures'>; 581 | } 582 | declare module 'flow-coverage-report/src/test/unit/test-flow.js' { 583 | declare module.exports: $Exports<'flow-coverage-report/src/test/unit/test-flow'>; 584 | } 585 | declare module 'flow-coverage-report/src/test/unit/test-index.js' { 586 | declare module.exports: $Exports<'flow-coverage-report/src/test/unit/test-index'>; 587 | } 588 | declare module 'flow-coverage-report/src/test/unit/test-package-index.js' { 589 | declare module.exports: $Exports<'flow-coverage-report/src/test/unit/test-package-index'>; 590 | } 591 | declare module 'flow-coverage-report/src/test/unit/test-promisified/test-exec.js' { 592 | declare module.exports: $Exports<'flow-coverage-report/src/test/unit/test-promisified/test-exec'>; 593 | } 594 | declare module 'flow-coverage-report/src/test/unit/test-promisified/test-file.js' { 595 | declare module.exports: $Exports<'flow-coverage-report/src/test/unit/test-promisified/test-file'>; 596 | } 597 | declare module 'flow-coverage-report/src/test/unit/test-promisified/test-glob.js' { 598 | declare module.exports: $Exports<'flow-coverage-report/src/test/unit/test-promisified/test-glob'>; 599 | } 600 | declare module 'flow-coverage-report/src/test/unit/test-promisified/test-mkdirp.js' { 601 | declare module.exports: $Exports<'flow-coverage-report/src/test/unit/test-promisified/test-mkdirp'>; 602 | } 603 | declare module 'flow-coverage-report/src/test/unit/test-react-components/common.js' { 604 | declare module.exports: $Exports<'flow-coverage-report/src/test/unit/test-react-components/common'>; 605 | } 606 | declare module 'flow-coverage-report/src/test/unit/test-react-components/test-body-coverage-sourcefile.js' { 607 | declare module.exports: $Exports<'flow-coverage-report/src/test/unit/test-react-components/test-body-coverage-sourcefile'>; 608 | } 609 | declare module 'flow-coverage-report/src/test/unit/test-react-components/test-body-coverage-summary.js' { 610 | declare module.exports: $Exports<'flow-coverage-report/src/test/unit/test-react-components/test-body-coverage-summary'>; 611 | } 612 | declare module 'flow-coverage-report/src/test/unit/test-react-components/test-coverage-file-table-head.js' { 613 | declare module.exports: $Exports<'flow-coverage-report/src/test/unit/test-react-components/test-coverage-file-table-head'>; 614 | } 615 | declare module 'flow-coverage-report/src/test/unit/test-react-components/test-coverage-file-table-row.js' { 616 | declare module.exports: $Exports<'flow-coverage-report/src/test/unit/test-react-components/test-coverage-file-table-row'>; 617 | } 618 | declare module 'flow-coverage-report/src/test/unit/test-react-components/test-coverage-meter-bar.js' { 619 | declare module.exports: $Exports<'flow-coverage-report/src/test/unit/test-react-components/test-coverage-meter-bar'>; 620 | } 621 | declare module 'flow-coverage-report/src/test/unit/test-react-components/test-coverage-summary-table.js' { 622 | declare module.exports: $Exports<'flow-coverage-report/src/test/unit/test-react-components/test-coverage-summary-table'>; 623 | } 624 | declare module 'flow-coverage-report/src/test/unit/test-react-components/test-footer.js' { 625 | declare module.exports: $Exports<'flow-coverage-report/src/test/unit/test-react-components/test-footer'>; 626 | } 627 | declare module 'flow-coverage-report/src/test/unit/test-react-components/test-head.js' { 628 | declare module.exports: $Exports<'flow-coverage-report/src/test/unit/test-react-components/test-head'>; 629 | } 630 | declare module 'flow-coverage-report/src/test/unit/test-react-components/test-html-report-page.js' { 631 | declare module.exports: $Exports<'flow-coverage-report/src/test/unit/test-react-components/test-html-report-page'>; 632 | } 633 | declare module 'flow-coverage-report/src/test/unit/test-report-html.js' { 634 | declare module.exports: $Exports<'flow-coverage-report/src/test/unit/test-report-html'>; 635 | } 636 | declare module 'flow-coverage-report/src/test/unit/test-report-json.js' { 637 | declare module.exports: $Exports<'flow-coverage-report/src/test/unit/test-report-json'>; 638 | } 639 | declare module 'flow-coverage-report/src/test/unit/test-report-text.js' { 640 | declare module.exports: $Exports<'flow-coverage-report/src/test/unit/test-report-text'>; 641 | } 642 | -------------------------------------------------------------------------------- /flow-typed/npm/husky_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: babe172ee674107af12a9e920ce2831e 2 | // flow-typed version: <>/husky_v^0.14.3/flow_v0.53.1 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'husky' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'husky' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'husky/__tests__/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'husky/bin/install' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'husky/bin/uninstall' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'husky/src/install' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'husky/src/uninstall' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'husky/src/utils/find-hooks-dir' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'husky/src/utils/find-parent' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'husky/src/utils/get-hook-script' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'husky/src/utils/is-husky' { 58 | declare module.exports: any; 59 | } 60 | 61 | // Filename aliases 62 | declare module 'husky/__tests__/index.js' { 63 | declare module.exports: $Exports<'husky/__tests__/index'>; 64 | } 65 | declare module 'husky/bin/install.js' { 66 | declare module.exports: $Exports<'husky/bin/install'>; 67 | } 68 | declare module 'husky/bin/uninstall.js' { 69 | declare module.exports: $Exports<'husky/bin/uninstall'>; 70 | } 71 | declare module 'husky/src/install.js' { 72 | declare module.exports: $Exports<'husky/src/install'>; 73 | } 74 | declare module 'husky/src/uninstall.js' { 75 | declare module.exports: $Exports<'husky/src/uninstall'>; 76 | } 77 | declare module 'husky/src/utils/find-hooks-dir.js' { 78 | declare module.exports: $Exports<'husky/src/utils/find-hooks-dir'>; 79 | } 80 | declare module 'husky/src/utils/find-parent.js' { 81 | declare module.exports: $Exports<'husky/src/utils/find-parent'>; 82 | } 83 | declare module 'husky/src/utils/get-hook-script.js' { 84 | declare module.exports: $Exports<'husky/src/utils/get-hook-script'>; 85 | } 86 | declare module 'husky/src/utils/is-husky.js' { 87 | declare module.exports: $Exports<'husky/src/utils/is-husky'>; 88 | } 89 | -------------------------------------------------------------------------------- /flow-typed/npm/lint-staged_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: ba1288eaa362d9801aef0dc839dd49e9 2 | // flow-typed version: <>/lint-staged_v^4.0.3/flow_v0.53.1 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'lint-staged' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'lint-staged' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'lint-staged/src/calcChunkSize' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'lint-staged/src/findBin' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'lint-staged/src/generateTasks' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'lint-staged/src/index' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'lint-staged/src/readConfigOption' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'lint-staged/src/runScript' { 46 | declare module.exports: any; 47 | } 48 | 49 | // Filename aliases 50 | declare module 'lint-staged/index' { 51 | declare module.exports: $Exports<'lint-staged'>; 52 | } 53 | declare module 'lint-staged/index.js' { 54 | declare module.exports: $Exports<'lint-staged'>; 55 | } 56 | declare module 'lint-staged/src/calcChunkSize.js' { 57 | declare module.exports: $Exports<'lint-staged/src/calcChunkSize'>; 58 | } 59 | declare module 'lint-staged/src/findBin.js' { 60 | declare module.exports: $Exports<'lint-staged/src/findBin'>; 61 | } 62 | declare module 'lint-staged/src/generateTasks.js' { 63 | declare module.exports: $Exports<'lint-staged/src/generateTasks'>; 64 | } 65 | declare module 'lint-staged/src/index.js' { 66 | declare module.exports: $Exports<'lint-staged/src/index'>; 67 | } 68 | declare module 'lint-staged/src/readConfigOption.js' { 69 | declare module.exports: $Exports<'lint-staged/src/readConfigOption'>; 70 | } 71 | declare module 'lint-staged/src/runScript.js' { 72 | declare module.exports: $Exports<'lint-staged/src/runScript'>; 73 | } 74 | -------------------------------------------------------------------------------- /flow-typed/npm/prettier_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: fcaaf74b7566b8ad352783ee583ce4ce 2 | // flow-typed version: <>/prettier_v^1.5.3/flow_v0.53.1 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'prettier' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'prettier' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'prettier/bin/prettier' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'prettier/parser-babylon' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'prettier/parser-flow' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'prettier/parser-graphql' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'prettier/parser-json' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'prettier/parser-parse5' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'prettier/parser-postcss' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'prettier/parser-typescript' { 54 | declare module.exports: any; 55 | } 56 | 57 | // Filename aliases 58 | declare module 'prettier/bin/prettier.js' { 59 | declare module.exports: $Exports<'prettier/bin/prettier'>; 60 | } 61 | declare module 'prettier/index' { 62 | declare module.exports: $Exports<'prettier'>; 63 | } 64 | declare module 'prettier/index.js' { 65 | declare module.exports: $Exports<'prettier'>; 66 | } 67 | declare module 'prettier/parser-babylon.js' { 68 | declare module.exports: $Exports<'prettier/parser-babylon'>; 69 | } 70 | declare module 'prettier/parser-flow.js' { 71 | declare module.exports: $Exports<'prettier/parser-flow'>; 72 | } 73 | declare module 'prettier/parser-graphql.js' { 74 | declare module.exports: $Exports<'prettier/parser-graphql'>; 75 | } 76 | declare module 'prettier/parser-json.js' { 77 | declare module.exports: $Exports<'prettier/parser-json'>; 78 | } 79 | declare module 'prettier/parser-parse5.js' { 80 | declare module.exports: $Exports<'prettier/parser-parse5'>; 81 | } 82 | declare module 'prettier/parser-postcss.js' { 83 | declare module.exports: $Exports<'prettier/parser-postcss'>; 84 | } 85 | declare module 'prettier/parser-typescript.js' { 86 | declare module.exports: $Exports<'prettier/parser-typescript'>; 87 | } 88 | -------------------------------------------------------------------------------- /flow-typed/npm/ramda_v0.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: fb41b34bb0832bbf65201e563f3ca56c 2 | // flow-typed version: ef808615f5/ramda_v0.x.x/flow_>=v0.39.x 3 | 4 | /* eslint-disable no-unused-vars, no-redeclare */ 5 | 6 | type Transformer = { 7 | '@@transducer/step': (r: A, a: *) => R, 8 | '@@transducer/init': () => A, 9 | '@@transducer/result': (result: *) => B 10 | } 11 | 12 | 13 | declare module ramda { 14 | declare type UnaryFn = (a: A) => R; 15 | declare type BinaryFn = ((a: A, b: B) => R) & ((a:A) => (b: B) => R); 16 | declare type UnarySameTypeFn = UnaryFn 17 | declare type BinarySameTypeFn = BinaryFn 18 | declare type NestedObject = { [k: string]: T | NestedObject } 19 | declare type UnaryPredicateFn = (x:T) => boolean 20 | declare type BinaryPredicateFn = (x:T, y:T) => boolean 21 | declare type BinaryPredicateFn2 = (x:T, y:S) => boolean 22 | 23 | declare interface ObjPredicate { 24 | (value: any, key: string): boolean; 25 | } 26 | 27 | declare type __CurriedFunction1 = 28 | & ((...r: [AA]) => R) 29 | declare type CurriedFunction1 = __CurriedFunction1 30 | 31 | declare type __CurriedFunction2 = 32 | & ((...r: [AA]) => CurriedFunction1) 33 | & ((...r: [AA, BB]) => R) 34 | declare type CurriedFunction2 = __CurriedFunction2 35 | 36 | declare type __CurriedFunction3 = 37 | & ((...r: [AA]) => CurriedFunction2) 38 | & ((...r: [AA, BB]) => CurriedFunction1) 39 | & ((...r: [AA, BB, CC]) => R) 40 | declare type CurriedFunction3 = __CurriedFunction3 41 | 42 | declare type __CurriedFunction4 = 43 | & ((...r: [AA]) => CurriedFunction3) 44 | & ((...r: [AA, BB]) => CurriedFunction2) 45 | & ((...r: [AA, BB, CC]) => CurriedFunction1) 46 | & ((...r: [AA, BB, CC, DD]) => R) 47 | declare type CurriedFunction4 = __CurriedFunction4 48 | 49 | declare type __CurriedFunction5 = 50 | & ((...r: [AA]) => CurriedFunction4) 51 | & ((...r: [AA, BB]) => CurriedFunction3) 52 | & ((...r: [AA, BB, CC]) => CurriedFunction2) 53 | & ((...r: [AA, BB, CC, DD]) => CurriedFunction1) 54 | & ((...r: [AA, BB, CC, DD, EE]) => R) 55 | declare type CurriedFunction5 = __CurriedFunction5 56 | 57 | declare type __CurriedFunction6 = 58 | & ((...r: [AA]) => CurriedFunction5) 59 | & ((...r: [AA, BB]) => CurriedFunction4) 60 | & ((...r: [AA, BB, CC]) => CurriedFunction3) 61 | & ((...r: [AA, BB, CC, DD]) => CurriedFunction2) 62 | & ((...r: [AA, BB, CC, DD, EE]) => CurriedFunction1) 63 | & ((...r: [AA, BB, CC, DD, EE, FF]) => R) 64 | declare type CurriedFunction6 = __CurriedFunction6 65 | 66 | declare type Curry = 67 | & (((...r: [A]) => R) => CurriedFunction1) 68 | & (((...r: [A, B]) => R) => CurriedFunction2) 69 | & (((...r: [A, B, C]) => R) => CurriedFunction3) 70 | & (((...r: [A, B, C, D]) => R) => CurriedFunction4) 71 | & (((...r: [A, B, C, D, E]) => R) => CurriedFunction5) 72 | & (((...r: [A, B, C, D, E, F]) => R) => CurriedFunction6) 73 | 74 | declare type Pipe = ((ab: UnaryFn, bc: UnaryFn, cd: UnaryFn, de: UnaryFn, ef: UnaryFn, fg: UnaryFn, ...rest: Array) => UnaryFn) 75 | & ((ab: UnaryFn, bc: UnaryFn, cd: UnaryFn, de: UnaryFn, ef: UnaryFn, ...rest: Array) => UnaryFn) 76 | & ((ab: UnaryFn, bc: UnaryFn, cd: UnaryFn, de: UnaryFn, ...rest: Array) => UnaryFn) 77 | & ((ab: UnaryFn, bc: UnaryFn, cd: UnaryFn, ...rest: Array) => UnaryFn) 78 | & ((ab: UnaryFn, bc: UnaryFn, ...rest: Array) => UnaryFn) 79 | & ((ab: UnaryFn, ...rest: Array) => UnaryFn) 80 | 81 | declare type Compose = & ((fg: UnaryFn, ef: UnaryFn, de: UnaryFn, cd: UnaryFn, bc: UnaryFn, ab: UnaryFn, ...rest: Array) => UnaryFn) 82 | & ((ef: UnaryFn, de: UnaryFn, cd: UnaryFn, bc: UnaryFn, ab: UnaryFn, ...rest: Array) => UnaryFn) 83 | & ((de: UnaryFn, cd: UnaryFn, bc: UnaryFn, ab: UnaryFn, ...rest: Array) => UnaryFn) 84 | & ((cd: UnaryFn, bc: UnaryFn, ab: UnaryFn, ...rest: Array) => UnaryFn) 85 | & ((bc: UnaryFn, ab: UnaryFn, ...rest: Array) => UnaryFn) 86 | & ((ab: UnaryFn, ...rest: Array) => UnaryFn) 87 | 88 | declare type Filter = 89 | & (|{[key:K]:V}>(fn: UnaryPredicateFn, xs:T) => T) 90 | & (|{[key:K]:V}>(fn: UnaryPredicateFn) => (xs:T) => T) 91 | 92 | 93 | declare class Monad { 94 | chain: Function 95 | } 96 | 97 | declare class Semigroup {} 98 | 99 | declare class Chain { 100 | chain|Array>(fn: (a:T) => V, x: V): V; 101 | chain|Array>(fn: (a:T) => V): (x: V) => V; 102 | } 103 | 104 | declare class GenericContructor { 105 | constructor(x: T): GenericContructor 106 | } 107 | 108 | declare class GenericContructorMulti { 109 | constructor(...args: Array): GenericContructor 110 | } 111 | 112 | 113 | /** 114 | * DONE: 115 | * Function* 116 | * List* 117 | * Logic 118 | * Math 119 | * Object* 120 | * Relation 121 | * String 122 | * Type 123 | */ 124 | 125 | declare var compose: Compose; 126 | declare var pipe: Pipe; 127 | declare var curry: Curry; 128 | declare function curryN(length: number, fn: (...args: Array) => any): Function 129 | 130 | // *Math 131 | declare var add: CurriedFunction2; 132 | declare var inc: UnaryFn; 133 | declare var dec: UnaryFn; 134 | declare var mean: UnaryFn,number>; 135 | declare var divide: CurriedFunction2 136 | declare var mathMod: CurriedFunction2; 137 | declare var median: UnaryFn,number>; 138 | declare var modulo: CurriedFunction2; 139 | declare var multiply: CurriedFunction2; 140 | declare var negate: UnaryFn; 141 | declare var product: UnaryFn,number>; 142 | declare var subtract: CurriedFunction2; 143 | declare var sum: UnaryFn,number>; 144 | 145 | // Filter 146 | declare var filter: Filter; 147 | declare var reject: Filter; 148 | 149 | // *String 150 | declare var match: CurriedFunction2>; 151 | declare var replace: CurriedFunction3; 152 | declare var split: CurriedFunction2> 153 | declare var test: CurriedFunction2 154 | declare function toLower(a: string): string; 155 | declare function toString(a: any): string; 156 | declare function toUpper(a: string): string; 157 | declare function trim(a: string): string; 158 | 159 | // *Type 160 | declare function is(t: T, ...rest: Array): (v: any) => boolean; 161 | declare function is(t: T, v: any): boolean; 162 | declare var propIs: CurriedFunction3; 163 | declare function type(x: ?any): string; 164 | declare function isArrayLike(x: any): boolean; 165 | 166 | declare function isNil(x: void|null): true; 167 | declare function isNil(x: mixed): false; 168 | 169 | // *List 170 | declare function adjust(fn:(a: T) => T, ...rest: Array): (index: number, ...rest: Array) => (src: Array) => Array; 171 | declare function adjust(fn:(a: T) => T, index: number, ...rest: Array): (src: Array) => Array; 172 | declare function adjust(fn:(a: T) => T, index: number, src: Array): Array; 173 | 174 | declare function all(fn: UnaryPredicateFn, xs: Array): boolean; 175 | declare function all(fn: UnaryPredicateFn, ...rest: Array): (xs: Array) => boolean; 176 | 177 | declare function any(fn: UnaryPredicateFn, xs: Array): boolean; 178 | declare function any(fn: UnaryPredicateFn, ...rest: Array): (xs: Array) => boolean; 179 | 180 | declare function aperture(n: number, xs: Array): Array>; 181 | declare function aperture(n: number, ...rest: Array): (xs: Array) => Array>; 182 | 183 | declare function append(x: E, xs: Array): Array 184 | declare function append(x: E, ...rest: Array): (xs: Array) => Array 185 | 186 | declare function prepend(x: E, xs: Array): Array 187 | declare function prepend(x: E, ...rest: Array): (xs: Array) => Array 188 | 189 | declare function concat|string>(x: T, y: T): T; 190 | declare function concat|string>(x: T): (y: T) => T; 191 | 192 | declare function contains|string>(x: E, xs: T): boolean 193 | declare function contains|string>(x: E, ...rest: Array): (xs: T) => boolean 194 | 195 | declare function drop|string>(n: number, ...rest: Array):(xs: T) => T; 196 | declare function drop|string>(n: number, xs: T): T; 197 | 198 | declare function dropLast|string>(n: number, ...rest: Array):(xs: T) => T; 199 | declare function dropLast|string>(n: number, xs: T): T; 200 | 201 | declare function dropLastWhile>(fn: UnaryPredicateFn, ...rest: Array): (xs:T) => T; 202 | declare function dropLastWhile>(fn: UnaryPredicateFn, xs:T): T; 203 | 204 | declare function dropWhile>(fn: UnaryPredicateFn, ...rest: Array): (xs:T) => T; 205 | declare function dropWhile>(fn: UnaryPredicateFn, xs:T): T; 206 | 207 | declare function dropRepeats>(xs:T): T; 208 | 209 | declare function dropRepeatsWith>(fn: BinaryPredicateFn, ...rest: Array): (xs:T) => T; 210 | declare function dropRepeatsWith>(fn: BinaryPredicateFn, xs:T): T; 211 | 212 | declare function groupBy(fn: (x: T) => string, xs: Array): {[key: string]: Array} 213 | declare function groupBy(fn: (x: T) => string, ...rest: Array): (xs: Array) => {[key: string]: Array} 214 | 215 | declare function groupWith|string>(fn: BinaryPredicateFn, xs: V): Array 216 | declare function groupWith|string>(fn: BinaryPredicateFn, ...rest: Array): (xs: V) => Array 217 | 218 | declare function head>(xs: V): ?T 219 | declare function head(xs: V): V 220 | 221 | declare function into,R:Array<*>|string|Object>(accum: R, xf: (a: A) => I, input: A): R 222 | declare function into,R>(accum: Transformer, xf: (a: A) => R, input: A): R 223 | 224 | declare function indexOf(x: E, xs: Array): number 225 | declare function indexOf(x: E, ...rest: Array): (xs: Array) => number 226 | 227 | declare function indexBy(fn: (x: T) => string, ...rest: Array): (xs: Array) => {[key: string]: T} 228 | declare function indexBy(fn: (x: T) => string, xs: Array): {[key: string]: T} 229 | 230 | declare function insert(index: number, ...rest: Array): (elem: T) => (src: Array) => Array 231 | declare function insert(index: number, elem: T, ...rest: Array): (src: Array) => Array 232 | declare function insert(index: number, elem: T, src: Array): Array 233 | 234 | declare function insertAll(index: number, ...rest: Array): (elem: Array) => (src: Array) => Array 235 | declare function insertAll(index: number, elems: Array, ...rest: Array): (src: Array) => Array 236 | declare function insertAll(index: number, elems: Array, src: Array): Array 237 | 238 | declare function join(x: string, xs: Array): string 239 | declare function join(x: string, ...rest: Array): (xs: Array) => string 240 | 241 | declare function last>(xs: V): ?T 242 | declare function last(xs: V): V 243 | 244 | declare function none(fn: UnaryPredicateFn, xs: Array): boolean; 245 | declare function none(fn: UnaryPredicateFn, ...rest: Array): (xs: Array) => boolean; 246 | 247 | declare function nth>(i: number, xs: T): ?V 248 | declare function nth|string>(i: number, ...rest: Array): ((xs: string) => string)&((xs: T) => ?V) 249 | declare function nth(i: number, xs: T): T 250 | 251 | declare function find|O>(fn: UnaryPredicateFn, ...rest: Array): (xs:T|O) => ?V|O; 252 | declare function find|O>(fn: UnaryPredicateFn, xs:T|O): ?V|O; 253 | declare function findLast|O>(fn: UnaryPredicateFn, ...rest: Array): (xs:T|O) => ?V|O; 254 | declare function findLast|O>(fn: UnaryPredicateFn, xs:T|O): ?V|O; 255 | 256 | declare function findIndex|{[key:K]:V}>(fn: UnaryPredicateFn, ...rest: Array): (xs:T) => number 257 | declare function findIndex|{[key:K]:V}>(fn: UnaryPredicateFn, xs:T): number 258 | declare function findLastIndex|{[key:K]:V}>(fn: UnaryPredicateFn, ...rest: Array): (xs:T) => number 259 | declare function findLastIndex|{[key:K]:V}>(fn: UnaryPredicateFn, xs:T): number 260 | 261 | declare function forEach(fn:(x:T) => ?V, xs: Array): Array 262 | declare function forEach(fn:(x:T) => ?V, ...rest: Array): (xs: Array) => Array 263 | 264 | declare function lastIndexOf(x: E, xs: Array): number 265 | declare function lastIndexOf(x: E, ...rest: Array): (xs: Array) => number 266 | 267 | declare function map(fn: (x:T) => R, xs: Array): Array; 268 | declare function map(fn: (x:T) => R, xs: S): S; 269 | declare function map(fn: (x:T) => R, ...rest: Array): ((xs: {[key: string]: T}) => {[key: string]: R}) & ((xs: Array) => Array) 270 | declare function map(fn: (x:T) => R, ...rest: Array): ((xs:S) => S) & ((xs: S) => S) 271 | declare function map(fn: (x:T) => R, xs: {[key: string]: T}): {[key: string]: R} 272 | 273 | declare type AccumIterator = (acc: R, x: A) => [R,B] 274 | declare function mapAccum(fn: AccumIterator, acc: R, xs: Array): [R, Array]; 275 | declare function mapAccum(fn: AccumIterator, ...rest: Array): (acc: R, xs: Array) => [R, Array]; 276 | 277 | declare function mapAccumRight(fn: AccumIterator, acc: R, xs: Array): [R, Array]; 278 | declare function mapAccumRight(fn: AccumIterator, ...rest: Array): (acc: R, xs: Array) => [R, Array]; 279 | 280 | declare function intersperse(x: E, xs: Array): Array 281 | declare function intersperse(x: E, ...rest: Array): (xs: Array) => Array 282 | 283 | declare function pair(a:A, b:B): [A,B] 284 | declare function pair(a:A, ...rest: Array): (b:B) => [A,B] 285 | 286 | declare function partition|{[key:K]:V}>(fn: UnaryPredicateFn, xs:T): [T,T] 287 | declare function partition|{[key:K]:V}>(fn: UnaryPredicateFn, ...rest: Array): (xs:T) => [T,T] 288 | 289 | declare function pluck|{[key:string]:V}>>(k: K, xs: T): Array 290 | declare function pluck|{[key:string]:V}>>(k: K,...rest: Array): (xs: T) => Array 291 | 292 | declare var range: CurriedFunction2>; 293 | 294 | declare function remove(from: number, ...rest: Array): ((to: number, ...rest: Array) => (src: Array) => Array) & ((to: number, src: Array) => Array) 295 | declare function remove(from: number, to: number, ...rest: Array): (src: Array) => Array 296 | declare function remove(from: number, to: number, src: Array): Array 297 | 298 | declare function repeat(x: T, times: number): Array 299 | declare function repeat(x: T, ...rest: Array): (times: number) => Array 300 | 301 | declare function slice|string>(from: number, ...rest: Array): ((to: number, ...rest: Array) => (src: T) => T) & ((to: number, src: T) => T) 302 | declare function slice|string>(from: number, to: number, ...rest: Array): (src: T) => T 303 | declare function slice|string>(from: number, to: number, src: T): T 304 | 305 | declare function sort>(fn: (a:V, b:V) => number, xs:T): T 306 | declare function sort>(fn: (a:V, b:V) => number, ...rest: Array): (xs:T) => T 307 | 308 | declare function times(fn:(i: number) => T, n: number): Array 309 | declare function times(fn:(i: number) => T, ...rest: Array): (n: number) => Array 310 | 311 | declare function take|string>(n: number, xs: T): T; 312 | declare function take|string>(n: number):(xs: T) => T; 313 | 314 | declare function takeLast|string>(n: number, xs: T): T; 315 | declare function takeLast|string>(n: number):(xs: T) => T; 316 | 317 | declare function takeLastWhile>(fn: UnaryPredicateFn, xs:T): T; 318 | declare function takeLastWhile>(fn: UnaryPredicateFn): (xs:T) => T; 319 | 320 | declare function takeWhile>(fn: UnaryPredicateFn, xs:T): T; 321 | declare function takeWhile>(fn: UnaryPredicateFn): (xs:T) => T; 322 | 323 | declare function unfold(fn: (seed: T) => [R, T]|boolean, ...rest: Array): (seed: T) => Array 324 | declare function unfold(fn: (seed: T) => [R, T]|boolean, seed: T): Array 325 | 326 | declare function uniqBy(fn:(x: T) => V, ...rest: Array): (xs: Array) => Array 327 | declare function uniqBy(fn:(x: T) => V, xs: Array): Array 328 | 329 | declare function uniqWith(fn: BinaryPredicateFn, ...rest: Array): (xs: Array) => Array 330 | declare function uniqWith(fn: BinaryPredicateFn, xs: Array): Array 331 | 332 | declare function update(index: number, ...rest: Array): ((elem: T, ...rest: Array) => (src: Array) => Array) & ((elem: T, src: Array) => Array) 333 | declare function update(index: number, elem: T, ...rest: Array): (src: Array) => Array 334 | declare function update(index: number, elem: T, src: Array): Array 335 | 336 | // TODO `without` as a transducer 337 | declare function without(xs: Array, src: Array): Array 338 | declare function without(xs: Array, ...rest: Array): (src: Array) => Array 339 | 340 | declare function xprod(xs: Array, ys: Array): Array<[T,S]> 341 | declare function xprod(xs: Array, ...rest: Array): (ys: Array) => Array<[T,S]> 342 | 343 | declare function zip(xs: Array, ys: Array): Array<[T,S]> 344 | declare function zip(xs: Array, ...rest: Array): (ys: Array) => Array<[T,S]> 345 | 346 | declare function zipObj(xs: Array, ys: Array): {[key:T]:S} 347 | declare function zipObj(xs: Array, ...rest: Array): (ys: Array) => {[key:T]:S} 348 | 349 | declare type NestedArray = Array> 350 | declare function flatten(xs: NestedArray): Array; 351 | 352 | declare function fromPairs(pair: Array<[T,V]>): {[key: string]:V}; 353 | 354 | declare function init|string>(xs: V): V; 355 | 356 | declare function length(xs: Array): number; 357 | 358 | declare function mergeAll(objs: Array<{[key: string]: any}>):{[key: string]: any}; 359 | 360 | declare function reverse|string>(xs: V): V; 361 | 362 | declare function reduce(fn: (acc: A, elem: B) => A, ...rest: Array): ((init: A, xs: Array) => A) & ((init: A, ...rest: Array) => (xs: Array) => A); 363 | declare function reduce(fn: (acc: A, elem: B) => A, init: A, ...rest: Array): (xs: Array) => A; 364 | declare function reduce(fn: (acc: A, elem: B) => A, init: A, xs: Array): A; 365 | 366 | declare function reduceBy(fn: (acc: B, elem: A) => B, ...rest: Array): 367 | ((acc: B, ...rest: Array) => ((keyFn:(elem: A) => string, ...rest: Array) => (xs: Array) => {[key: string]: B}) & ((keyFn:(elem: A) => string, xs: Array) => {[key: string]: B})) 368 | & ((acc: B, keyFn:(elem: A) => string, ...rest: Array) => (xs: Array) => {[key: string]: B}) 369 | & ((acc: B, keyFn:(elem: A) => string, xs: Array) => {[key: string]: B}) 370 | declare function reduceBy(fn: (acc: B, elem: A) => B, acc: B, ...rest: Array): 371 | ((keyFn:(elem: A) => string, ...rest: Array) => (xs: Array) => {[key: string]: B}) 372 | & ((keyFn:(elem: A) => string, xs: Array) => {[key: string]: B}) 373 | declare function reduceBy(fn: (acc: B, elem: A) => B, acc: B, keyFn:(elem: A) => string): (xs: Array) => {[key: string]: B}; 374 | declare function reduceBy(fn: (acc: B, elem: A) => B, acc: B, keyFn:(elem: A) => string, xs: Array): {[key: string]: B}; 375 | 376 | declare function reduceRight(fn: (acc: A, elem: B) => A, ...rest: Array): ((init: A, xs: Array) => A) & ((init: A, ...rest: Array) => (xs: Array) => A); 377 | declare function reduceRight(fn: (acc: A, elem: B) => A, init: A, ...rest: Array): (xs: Array) => A; 378 | declare function reduceRight(fn: (acc: A, elem: B) => A, init: A, xs: Array): A; 379 | 380 | declare function scan(fn: (acc: A, elem: B) => A, ...rest: Array): ((init: A, xs: Array) => Array) & ((init: A, ...rest: Array) => (xs: Array) => Array); 381 | declare function scan(fn: (acc: A, elem: B) => A, init: A, ...rest: Array): (xs: Array) => Array; 382 | declare function scan(fn: (acc: A, elem: B) => A, init: A, xs: Array): Array; 383 | 384 | declare function splitAt|string>(i: number, xs: T): [T,T]; 385 | declare function splitAt|string>(i: number): (xs: T) => [T,T]; 386 | declare function splitEvery|string>(i: number, xs: T): Array; 387 | declare function splitEvery|string>(i: number): (xs: T) => Array; 388 | declare function splitWhen>(fn: UnaryPredicateFn, xs:T): [T,T]; 389 | declare function splitWhen>(fn: UnaryPredicateFn): (xs:T) => [T,T]; 390 | 391 | declare function tail|string>(xs: V): V; 392 | 393 | declare function transpose(xs: Array>): Array>; 394 | 395 | declare function uniq(xs: Array): Array; 396 | 397 | declare function unnest(xs: NestedArray): NestedArray; 398 | 399 | declare function zipWith(fn: (a: T, b: S) => R, ...rest: Array): ((xs: Array, ys: Array) => Array) & ((xs: Array, ...rest: Array ) => (ys: Array) => Array) 400 | declare function zipWith(fn: (a: T, b: S) => R, xs: Array, ...rest: Array): (ys: Array) => Array; 401 | declare function zipWith(fn: (a: T, b: S) => R, xs: Array, ys: Array): Array; 402 | 403 | // *Relation 404 | declare function equals(x: T, ...rest: Array): (y: T) => boolean; 405 | declare function equals(x: T, y: T): boolean; 406 | 407 | declare function eqBy(fn: (x: A) => B, ...rest: Array): ((x: A, y: A) => boolean) & ((x: A, ...rest: Array) => (y: A) => boolean); 408 | declare function eqBy(fn: (x: A) => B, x: A, ...rest: Array): (y: A) => boolean; 409 | declare function eqBy(fn: (x: A) => B, x: A, y: A): boolean; 410 | 411 | declare function propEq(prop: string, ...rest: Array): ((val: *, o: {[k:string]: *}) => boolean) & ((val: *, ...rest: Array) => (o: {[k:string]: *}) => boolean) 412 | declare function propEq(prop: string, val: *, ...rest: Array): (o: {[k:string]: *}) => boolean; 413 | declare function propEq(prop: string, val: *, o: {[k:string]:*}): boolean; 414 | 415 | declare function pathEq(path: Array, ...rest: Array): ((val: any, o: Object) => boolean) & ((val: any, ...rest: Array) => (o: Object) => boolean); 416 | declare function pathEq(path: Array, val: any, ...rest: Array): (o: Object) => boolean; 417 | declare function pathEq(path: Array, val: any, o: Object): boolean; 418 | 419 | declare function clamp(min: T, ...rest: Array): 420 | ((max: T, ...rest: Array) => (v: T) => T) & ((max: T, v: T) => T); 421 | declare function clamp(min: T, max: T, ...rest: Array): (v: T) => T; 422 | declare function clamp(min: T, max: T, v: T): T; 423 | 424 | declare function countBy(fn: (x: T) => string, ...rest: Array): (list: Array) => {[key: string]: number}; 425 | declare function countBy(fn: (x: T) => string, list: Array): {[key: string]: number}; 426 | 427 | declare function difference(xs1: Array, ...rest: Array): (xs2: Array) => Array; 428 | declare function difference(xs1: Array, xs2: Array): Array; 429 | 430 | declare function differenceWith(fn: BinaryPredicateFn, ...rest: Array): ((xs1: Array) => (xs2: Array) => Array) & ((xs1: Array, xs2: Array) => Array); 431 | declare function differenceWith(fn: BinaryPredicateFn, xs1: Array, ...rest: Array): (xs2: Array) => Array; 432 | declare function differenceWith(fn: BinaryPredicateFn, xs1: Array, xs2: Array): Array; 433 | 434 | declare function eqBy(fn: (x: T) => T, x: T, y: T): boolean; 435 | declare function eqBy(fn: (x: T) => T): (x: T, y: T) => boolean; 436 | declare function eqBy(fn: (x: T) => T, x: T): (y: T) => boolean; 437 | declare function eqBy(fn: (x: T) => T): (x: T) => (y: T) => boolean; 438 | 439 | declare function gt(x: T, ...rest: Array): (y: T) => boolean; 440 | declare function gt(x: T, y: T): boolean; 441 | 442 | declare function gte(x: T, ...rest: Array): (y: T) => boolean; 443 | declare function gte(x: T, y: T): boolean; 444 | 445 | declare function identical(x: T, ...rest: Array): (y: T) => boolean; 446 | declare function identical(x: T, y: T): boolean; 447 | 448 | declare function intersection(x: Array, y: Array): Array; 449 | declare function intersection(x: Array): (y: Array) => Array; 450 | 451 | declare function intersectionWith(fn: BinaryPredicateFn, ...rest: Array): ((x: Array, y: Array) => Array) & ((x: Array) => (y: Array) => Array); 452 | declare function intersectionWith(fn: BinaryPredicateFn, x: Array, ...rest: Array): (y: Array) => Array; 453 | declare function intersectionWith(fn: BinaryPredicateFn, x: Array, y: Array): Array; 454 | 455 | declare function lt(x: T, ...rest: Array): (y: T) => boolean; 456 | declare function lt(x: T, y: T): boolean; 457 | 458 | declare function lte(x: T, ...rest: Array): (y: T) => boolean; 459 | declare function lte(x: T, y: T): boolean; 460 | 461 | declare function max(x: T, ...rest: Array): (y: T) => T; 462 | declare function max(x: T, y: T): T; 463 | 464 | declare function maxBy(fn: (x:T) => V, ...rest: Array): ((x: T, y: T) => T) & ((x: T) => (y: T) => T); 465 | declare function maxBy(fn: (x:T) => V, x: T, ...rest: Array): (y: T) => T; 466 | declare function maxBy(fn: (x:T) => V, x: T, y: T): T; 467 | 468 | declare function min(x: T, ...rest: Array): (y: T) => T; 469 | declare function min(x: T, y: T): T; 470 | 471 | declare function minBy(fn: (x:T) => V, ...rest: Array): ((x: T, y: T) => T) & ((x: T) => (y: T) => T); 472 | declare function minBy(fn: (x:T) => V, x: T, ...rest: Array): (y: T) => T; 473 | declare function minBy(fn: (x:T) => V, x: T, y: T): T; 474 | 475 | // TODO: sortBy: Started failing in v38... 476 | // declare function sortBy(fn: (x:T) => V, ...rest: Array): (x: Array) => Array; 477 | // declare function sortBy(fn: (x:T) => V, x: Array): Array; 478 | 479 | declare function symmetricDifference(x: Array, ...rest: Array): (y: Array) => Array; 480 | declare function symmetricDifference(x: Array, y: Array): Array; 481 | 482 | declare function symmetricDifferenceWith(fn: BinaryPredicateFn, ...rest: Array): ((x: Array, ...rest: Array) => (y: Array) => Array) & ((x: Array, y: Array) => Array); 483 | declare function symmetricDifferenceWith(fn: BinaryPredicateFn, x: Array, ...rest: Array): (y: Array) => Array; 484 | declare function symmetricDifferenceWith(fn: BinaryPredicateFn, x: Array, y: Array): Array; 485 | 486 | declare function union(x: Array, ...rest: Array): (y: Array) => Array; 487 | declare function union(x: Array, y: Array): Array; 488 | 489 | declare function unionWith(fn: BinaryPredicateFn, ...rest: Array): ((x: Array, ...rest: Array) => (y: Array) => Array) & (x: Array, y: Array) => Array; 490 | declare function unionWith(fn: BinaryPredicateFn, x: Array, ...rest: Array): (y: Array) => Array; 491 | declare function unionWith(fn: BinaryPredicateFn, x: Array, y: Array): Array; 492 | 493 | // *Object 494 | declare function assoc(key: string, ...args: Array): 495 | ((val: T, ...rest: Array) => (src: {[k:string]:S}) => {[k:string]:S|T}) & ((val: T, src: {[k:string]:S}) => {[k:string]:S|T}); 496 | declare function assoc(key: string, val:T, ...args: Array): (src: {[k:string]:S}) => {[k:string]:S|T}; 497 | declare function assoc(key: string, val: T, src: {[k:string]:S}): {[k:string]:S|T}; 498 | 499 | declare function assocPath(key: Array, ...args: Array): 500 | ((val: T, ...rest: Array) => (src: {[k:string]:S}) => {[k:string]:S|T}) 501 | & ((val: T) => (src: {[k:string]:S}) => {[k:string]:S|T}); 502 | declare function assocPath(key: Array, val:T, ...args: Array): (src: {[k:string]:S}) => {[k:string]:S|T}; 503 | declare function assocPath(key: Array, val:T, src: {[k:string]:S}): {[k:string]:S|T}; 504 | 505 | declare function clone(src: T): $Shape; 506 | 507 | declare function dissoc(key: string, ...args: Array): 508 | ((val: T, ...rest: Array) => (src: {[k:string]:T}) => {[k:string]:T}) & ((val: T, src: {[k:string]:T}) => {[k:string]:T}); 509 | declare function dissoc(key: string, val:T, ...args: Array): (src: {[k:string]:T}) => {[k:string]:T}; 510 | declare function dissoc(key: string, val: T, src: {[k:string]:T}): {[k:string]:T}; 511 | 512 | declare function dissocPath(key: Array, ...args: Array): 513 | ((val: T, ...rest: Array) => (src: {[k:string]:T}) => {[k:string]:T}) 514 | & ((val: T) => (src: {[k:string]:T}) => {[k:string]:T}); 515 | declare function dissocPath(key: Array, val:T, ...args: Array): (src: {[k:string]:T}) => {[k:string]:T}; 516 | declare function dissocPath(key: Array, val:T, src: {[k:string]:T}): {[k:string]:T}; 517 | 518 | // TODO: Started failing in v31... (Attempt to fix below) 519 | // declare type __UnwrapNestedObjectR U>> = U 520 | // declare type UnwrapNestedObjectR = UnwrapNestedObjectR<*, *, T> 521 | // 522 | // declare function evolve R>>(fn: T, ...rest: Array): (src: NestedObject) => UnwrapNestedObjectR; 523 | // declare function evolve R>>(fn: T, src: NestedObject): UnwrapNestedObjectR; 524 | 525 | declare function eqProps(key: string, ...args: Array): 526 | ((o1: Object, ...rest: Array) => (o2: Object) => boolean) 527 | & ((o1: Object, o2: Object) => boolean); 528 | declare function eqProps(key: string, o1: Object, ...args: Array): (o2: Object) => boolean; 529 | declare function eqProps(key: string, o1: Object, o2: Object): boolean; 530 | 531 | declare function has(key: string, o: Object): boolean; 532 | declare function has(key: string):(o: Object) => boolean; 533 | 534 | declare function hasIn(key: string, o: Object): boolean; 535 | declare function hasIn(key: string): (o: Object) => boolean; 536 | 537 | declare function invert(o: Object): {[k: string]: Array}; 538 | declare function invertObj(o: Object): {[k: string]: string}; 539 | 540 | declare function keys(o: Object): Array; 541 | 542 | /* TODO 543 | lens 544 | lensIndex 545 | lensPath 546 | lensProp 547 | */ 548 | 549 | declare function mapObjIndexed(fn: (val: A, key: string, o: Object) => B, o: {[key: string]: A}): {[key: string]: B}; 550 | declare function mapObjIndexed(fn: (val: A, key: string, o: Object) => B, ...args: Array): (o: {[key: string]: A}) => {[key: string]: B}; 551 | 552 | declare function merge(o1: A, ...rest: Array): (o2: B) => A & B; 553 | declare function merge(o1: A, o2: B): A & B; 554 | 555 | declare function mergeAll(os: Array<{[k:string]:T}>): {[k:string]:T}; 556 | 557 | declare function mergeWith(fn: (v1: T, v2: S) => R): 558 | ((o1: A, ...rest: Array) => (o2: B) => A & B) & ((o1: A, o2: B) => A & B); 559 | declare function mergeWith(fn: (v1: T, v2: S) => R, o1: A, o2: B): A & B; 560 | declare function mergeWith(fn: (v1: T, v2: S) => R, o1: A, ...rest: Array): (o2: B) => A & B; 561 | 562 | declare function mergeWithKey(fn: (key: $Keys, v1: T, v2: S) => R): 563 | ((o1: A, ...rest: Array) => (o2: B) => A & B) & ((o1: A, o2: B) => A & B); 564 | declare function mergeWithKey(fn: (key: $Keys, v1: T, v2: S) => R, o1: A, o2: B): A & B; 565 | declare function mergeWithKey(fn: (key: $Keys, v1: T, v2: S) => R, o1: A, ...rest: Array): (o2: B) => A & B; 566 | 567 | declare function objOf(key: string, ...rest: Array): (val: T) => {[key: string]: T}; 568 | declare function objOf(key: string, val: T): {[key: string]: T}; 569 | 570 | declare function omit(keys: Array<$Keys>, ...rest: Array): (val: T) => Object; 571 | declare function omit(keys: Array<$Keys>, val: T): Object; 572 | 573 | // TODO over 574 | 575 | declare function path(p: Array, ...rest: Array): (o: NestedObject) => V; 576 | declare function path(p: Array, ...rest: Array): (o: null|void) => void; 577 | declare function path(p: Array, ...rest: Array): (o: mixed) => ?V; 578 | declare function path>(p: Array, o: A): V; 579 | declare function path(p: Array, o: A): void; 580 | declare function path(p: Array, o: A): ?V; 581 | 582 | declare function path(p: Array, ...rest: Array): (o: NestedObject) => V; 583 | declare function path(p: Array, ...rest: Array): (o: null|void) => void; 584 | declare function path(p: Array, ...rest: Array): (o: mixed) => ?V; 585 | declare function path>(p: Array, o: A): V; 586 | declare function path(p: Array, o: A): void; 587 | declare function path(p: Array, o: A): ?V; 588 | 589 | declare function pathOr>(or: T, ...rest: Array): 590 | ((p: Array, ...rest: Array) => (o: ?A) => V|T) 591 | & ((p: Array, o: ?A) => V|T); 592 | declare function pathOr>(or: T, p: Array, ...rest: Array): (o: ?A) => V|T; 593 | declare function pathOr>(or: T, p: Array, o: ?A): V|T; 594 | 595 | declare function pick(keys: Array, ...rest: Array): (val: {[key:string]: A}) => {[key:string]: A}; 596 | declare function pick(keys: Array, val: {[key:string]: A}): {[key:string]: A}; 597 | 598 | declare function pickAll(keys: Array, ...rest: Array): (val: {[key:string]: A}) => {[key:string]: ?A}; 599 | declare function pickAll(keys: Array, val: {[key:string]: A}): {[key:string]: ?A}; 600 | 601 | declare function pickBy(fn: BinaryPredicateFn2, ...rest: Array): (val: {[key:string]: A}) => {[key:string]: A}; 602 | declare function pickBy(fn: BinaryPredicateFn2, val: {[key:string]: A}): {[key:string]: A}; 603 | 604 | declare function project(keys: Array, ...rest: Array): (val: Array<{[key:string]: T}>) => Array<{[key:string]: T}>; 605 | declare function project(keys: Array, val: Array<{[key:string]: T}>): Array<{[key:string]: T}>; 606 | 607 | declare function prop(key: $Keys, ...rest: Array): (o: O) => ?T; 608 | declare function prop(key: $Keys, o: O): ?T; 609 | 610 | declare function propOr(or: T, ...rest: Array): 611 | ((p: $Keys, ...rest: Array) => (o: A) => V|T) 612 | & ((p: $Keys, o: A) => V|T); 613 | declare function propOr(or: T, p: $Keys, ...rest: Array): (o: A) => V|T; 614 | declare function propOr(or: T, p: $Keys, o: A): V|T; 615 | 616 | declare function keysIn(o: Object): Array; 617 | 618 | declare function props(keys: Array<$Keys>, ...rest: Array): (o: O) => Array; 619 | declare function props(keys: Array<$Keys>, o: O): Array; 620 | 621 | // TODO set 622 | 623 | declare function toPairs(o: O): Array<[$Keys, T]>; 624 | 625 | declare function toPairsIn(o: O): Array<[string, T]>; 626 | 627 | 628 | declare function values(o: O): Array; 629 | 630 | declare function valuesIn(o: O): Array; 631 | 632 | declare function where(predObj: {[key: string]: UnaryPredicateFn}, ...rest: Array): (o: {[k:string]:T}) => boolean; 633 | declare function where(predObj: {[key: string]: UnaryPredicateFn}, o: {[k:string]:T}): boolean; 634 | 635 | declare function whereEq(predObj: O, ...rest: Array): (o: $Shape) => boolean; 636 | declare function whereEq(predObj: O, o: $Shape): boolean; 637 | 638 | // TODO view 639 | 640 | // *Function 641 | declare var __: *; 642 | 643 | declare var T: (_: any) => true; 644 | declare var F: (_: any) => false; 645 | 646 | declare function addIndex(iterFn:(fn:(x:A) => B, xs: Array) => Array): (fn: (x: A, idx: number, xs: Array) => B, xs: Array) => Array; 647 | 648 | declare function always(x:T): (x: any) => T; 649 | 650 | declare function ap(fns: Array<(x:T) => V>, ...rest: Array): (xs: Array) => Array; 651 | declare function ap(fns: Array<(x:T) => V>, xs: Array): Array; 652 | 653 | declare function apply(fn: (...args: Array) => V, ...rest: Array): (xs: Array) => V; 654 | declare function apply(fn: (...args: Array) => V, xs: Array): V; 655 | 656 | declare function applySpec, T: NestedObject<(...args: A) => S>>(spec: T): (...args: A) => NestedObject 657 | 658 | declare function binary(fn:(...args: Array) => T): (x: any, y: any) => T; 659 | 660 | declare function bind(fn: (...args: Array) => any, thisObj: T): (...args: Array) => any; 661 | 662 | declare function call(fn: (...args: Array) => T, ...args: Array): T; 663 | 664 | declare function comparator(fn: BinaryPredicateFn): (x:T, y:T) => number; 665 | 666 | // TODO add tests 667 | declare function construct(ctor: Class>): (x: T) => GenericContructor; 668 | 669 | // TODO add tests 670 | declare function constructN(n: number, ctor: Class>): (...args: any) => GenericContructorMulti; 671 | 672 | // TODO make less generic 673 | declare function converge(after: Function, fns: Array): Function; 674 | 675 | declare function empty(x: T): T; 676 | 677 | declare function flip(fn: (arg0: A, arg1: B) => TResult): CurriedFunction2; 678 | declare function flip(fn: (arg0: A, arg1: B, arg2: C) => TResult): (( arg0: B, arg1: A, ...rest: Array) => (arg2: C) => TResult) & (( arg0: B, arg1: A, arg2: C) => TResult); 679 | declare function flip(fn: (arg0: A, arg1: B, arg2: C, arg3: D) => TResult): ((arg1: B, arg0: A, ...rest: Array) => (arg2: C, arg3: D) => TResult) & ((arg1: B, arg0: A, arg2: C, arg3: D) => TResult); 680 | declare function flip(fn: (arg0: A, arg1: B, arg2: C, arg3: D, arg4:E) => TResult): ((arg1: B, arg0: A, ...rest: Array) => (arg2: C, arg3: D, arg4: E) => TResult) & ((arg1: B, arg0: A, arg2: C, arg3: D, arg4: E) => TResult); 681 | 682 | declare function identity(x:T): T; 683 | 684 | declare function invoker(arity: number, name: $Enum): CurriedFunction2 & CurriedFunction3 & CurriedFunction4 685 | 686 | declare function juxt(fns: Array<(...args: Array) => T>): (...args: Array) => Array; 687 | 688 | // TODO lift 689 | 690 | // TODO liftN 691 | 692 | declare function memoize) => B>(fn:T):T; 693 | 694 | declare function nAry(arity: number, fn:(...args: Array) => T): (...args: Array) => T; 695 | 696 | declare function nthArg(n: number): (...args: Array) => T; 697 | 698 | declare function of(x: T): Array; 699 | 700 | declare function once) => B>(fn:T):T; 701 | 702 | // TODO partial 703 | // TODO partialRight 704 | // TODO pipeK 705 | // TODO pipeP 706 | 707 | declare function tap(fn: (x: T) => any, ...rest: Array): (x: T) => T; 708 | declare function tap(fn: (x: T) => any, x: T): T; 709 | 710 | // TODO tryCatch 711 | 712 | declare function unapply(fn: (xs: Array) => V): (...args: Array) => V; 713 | 714 | declare function unary(fn:(...args: Array) => T): (x: any) => T; 715 | 716 | declare var uncurryN: 717 | & ((2, A => B => C) => (A, B) => C) 718 | & ((3, A => B => C => D) => (A, B, C) => D) 719 | & ((4, A => B => C => D => E) => (A, B, C, D) => E) 720 | & ((5, A => B => C => D => E => F) => (A, B, C, D, E) => F) 721 | & ((6, A => B => C => D => E => F => G) => (A, B, C, D, E, F) => G) 722 | & ((7, A => B => C => D => E => F => G => H) => (A, B, C, D, E, F, G) => H) 723 | & ((8, A => B => C => D => E => F => G => H => I) => (A, B, C, D, E, F, G, H) => I) 724 | 725 | //TODO useWith 726 | 727 | declare function wrap) => B>(fn: F, fn2: (fn: F, ...args: Array) => D): (...args: Array) => D; 728 | 729 | // *Logic 730 | 731 | declare function allPass(fns: Array<(...args: Array) => boolean>): (...args: Array) => boolean; 732 | 733 | declare function and(x: boolean, ...rest: Array): (y: boolean) => boolean; 734 | declare function and(x: boolean, y: boolean): boolean; 735 | 736 | declare function anyPass(fns: Array<(...args: Array) => boolean>): (...args: Array) => boolean; 737 | 738 | declare function both(x: (...args: Array) => boolean, ...rest: Array): (y: (...args: Array) => boolean) => (...args: Array) => boolean; 739 | declare function both(x: (...args: Array) => boolean, y: (...args: Array) => boolean): (...args: Array) => boolean; 740 | 741 | declare function complement(x: (...args: Array) => boolean): (...args: Array) => boolean; 742 | 743 | declare function cond(fns: Array<[(...args: Array) => boolean, (...args: Array) => B]>): (...args: Array) => B; 744 | 745 | 746 | declare function defaultTo(d: T, ...rest: Array): (x: ?V) => V|T; 747 | declare function defaultTo(d: T, x: ?V): V|T; 748 | 749 | declare function either(x: (...args: Array) => *, ...rest: Array): (y: (...args: Array) => *) => (...args: Array) => *; 750 | declare function either(x: (...args: Array) => *, y: (...args: Array) => *): (...args: Array) => *; 751 | 752 | declare function ifElse(cond:(...args: Array) => boolean, ...rest: Array): 753 | ((f1: (...args: Array) => B, ...rest: Array) => (f2: (...args: Array) => C) => (...args: Array) => B|C) 754 | & ((f1: (...args: Array) => B, f2: (...args: Array) => C) => (...args: Array) => B|C) 755 | declare function ifElse( 756 | cond:(...args: Array) => boolean, 757 | f1: (...args: Array) => B, 758 | f2: (...args: Array) => C 759 | ): (...args: Array) => B|C; 760 | 761 | declare function isEmpty(x:?Array|Object|string): boolean; 762 | 763 | declare function not(x:boolean): boolean; 764 | 765 | declare function or(x: boolean, y: boolean): boolean; 766 | declare function or(x: boolean): (y: boolean) => boolean; 767 | 768 | // TODO: pathSatisfies: Started failing in v39... 769 | // declare function pathSatisfies(cond: (x: T) => boolean, path: Array, o: NestedObject): boolean; 770 | // declare function pathSatisfies(cond: (x: T) => boolean, path: Array, ...rest: Array): (o: NestedObject) => boolean; 771 | // declare function pathSatisfies(cond: (x: T) => boolean, ...rest: Array): 772 | // ((path: Array, ...rest: Array) => (o: NestedObject) => boolean) 773 | // & ((path: Array, o: NestedObject) => boolean) 774 | 775 | declare function propSatisfies(cond: (x: T) => boolean, prop: string, o: NestedObject): boolean; 776 | declare function propSatisfies(cond: (x: T) => boolean, prop: string, ...rest: Array): (o: NestedObject) => boolean; 777 | declare function propSatisfies(cond: (x: T) => boolean, ...rest: Array): 778 | ((prop: string, ...rest: Array) => (o: NestedObject) => boolean) 779 | & ((prop: string, o: NestedObject) => boolean) 780 | 781 | declare function unless(pred: UnaryPredicateFn, ...rest: Array): 782 | ((fn: (x: S) => V, ...rest: Array) => (x: T|S) => T|V) 783 | & ((fn: (x: S) => V, x: T|S) => T|V); 784 | declare function unless(pred: UnaryPredicateFn, fn: (x: S) => V, ...rest: Array): (x: T|S) => V|T; 785 | declare function unless(pred: UnaryPredicateFn, fn: (x: S) => V, x: T|S): T|V; 786 | 787 | declare function until(pred: UnaryPredicateFn, ...rest: Array): 788 | ((fn: (x: T) => T, ...rest: Array) => (x: T) => T) 789 | & ((fn: (x: T) => T, x: T) => T); 790 | declare function until(pred: UnaryPredicateFn, fn: (x: T) => T, ...rest: Array): (x: T) => T; 791 | declare function until(pred: UnaryPredicateFn, fn: (x: T) => T, x: T): T; 792 | 793 | declare function when(pred: UnaryPredicateFn, ...rest: Array): 794 | ((fn: (x: S) => V, ...rest: Array) => (x: T|S) => T|V) 795 | & ((fn: (x: S) => V, x: T|S) => T|V); 796 | declare function when(pred: UnaryPredicateFn, fn: (x: S) => V, ...rest: Array): (x: T|S) => V|T; 797 | declare function when(pred: UnaryPredicateFn, fn: (x: S) => V, x: T|S): T|V; 798 | } 799 | -------------------------------------------------------------------------------- /flow-typed/npm/react-redux_v5.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: c32cee7feb0968b1fb0c4fc5e755610b 2 | // flow-typed version: aff2bf770e/react-redux_v5.x.x/flow_>=v0.53.x 3 | 4 | // flow-typed signature: 8db7b853f57c51094bf0ab8b2650fd9c 5 | // flow-typed version: ab8db5f14d/react-redux_v5.x.x/flow_>=v0.30.x 6 | 7 | import type { Dispatch, Store } from "redux"; 8 | 9 | declare module "react-redux" { 10 | /* 11 | 12 | S = State 13 | A = Action 14 | OP = OwnProps 15 | SP = StateProps 16 | DP = DispatchProps 17 | 18 | */ 19 | 20 | declare type MapStateToProps = ( 21 | state: S, 22 | ownProps: OP 23 | ) => SP | MapStateToProps; 24 | 25 | declare type MapDispatchToProps = 26 | | ((dispatch: Dispatch, ownProps: OP) => DP) 27 | | DP; 28 | 29 | declare type MergeProps = ( 30 | stateProps: SP, 31 | dispatchProps: DP, 32 | ownProps: OP 33 | ) => P; 34 | 35 | declare type Context = { store: Store<*, *> }; 36 | 37 | declare class ConnectedComponent extends React$Component { 38 | static WrappedComponent: Class>, 39 | getWrappedInstance(): React$Component

, 40 | props: OP, 41 | state: void 42 | } 43 | 44 | declare type ConnectedComponentClass = Class< 45 | ConnectedComponent 46 | >; 47 | 48 | declare type Connector = ( 49 | component: React$ComponentType

50 | ) => ConnectedComponentClass; 51 | 52 | declare class Provider extends React$Component<{ 53 | store: Store, 54 | children?: any 55 | }> {} 56 | 57 | declare type ConnectOptions = { 58 | pure?: boolean, 59 | withRef?: boolean 60 | }; 61 | 62 | declare type Null = null | void; 63 | 64 | declare function connect( 65 | ...rest: Array // <= workaround for https://github.com/facebook/flow/issues/2360 66 | ): Connector } & OP>>; 67 | 68 | declare function connect( 69 | mapStateToProps: Null, 70 | mapDispatchToProps: Null, 71 | mergeProps: Null, 72 | options: ConnectOptions 73 | ): Connector } & OP>>; 74 | 75 | declare function connect( 76 | mapStateToProps: MapStateToProps, 77 | mapDispatchToProps: Null, 78 | mergeProps: Null, 79 | options?: ConnectOptions 80 | ): Connector } & OP>>; 81 | 82 | declare function connect( 83 | mapStateToProps: Null, 84 | mapDispatchToProps: MapDispatchToProps, 85 | mergeProps: Null, 86 | options?: ConnectOptions 87 | ): Connector>; 88 | 89 | declare function connect( 90 | mapStateToProps: MapStateToProps, 91 | mapDispatchToProps: MapDispatchToProps, 92 | mergeProps: Null, 93 | options?: ConnectOptions 94 | ): Connector>; 95 | 96 | declare function connect( 97 | mapStateToProps: MapStateToProps, 98 | mapDispatchToProps: Null, 99 | mergeProps: MergeProps, 100 | options?: ConnectOptions 101 | ): Connector; 102 | 103 | declare function connect( 104 | mapStateToProps: MapStateToProps, 105 | mapDispatchToProps: MapDispatchToProps, 106 | mergeProps: MergeProps, 107 | options?: ConnectOptions 108 | ): Connector; 109 | } 110 | -------------------------------------------------------------------------------- /flow-typed/npm/react-router-dom_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 7fb72ee35d626ae8c74051f92bac75f1 2 | // flow-typed version: <>/react-router-dom_v^4.1.2/flow_v0.53.1 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'react-router-dom' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'react-router-dom' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'react-router-dom/BrowserRouter' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'react-router-dom/es/BrowserRouter' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'react-router-dom/es/HashRouter' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'react-router-dom/es/index' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'react-router-dom/es/Link' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'react-router-dom/es/matchPath' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'react-router-dom/es/MemoryRouter' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'react-router-dom/es/NavLink' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'react-router-dom/es/Prompt' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'react-router-dom/es/Redirect' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'react-router-dom/es/Route' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'react-router-dom/es/Router' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'react-router-dom/es/StaticRouter' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'react-router-dom/es/Switch' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'react-router-dom/es/withRouter' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'react-router-dom/HashRouter' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'react-router-dom/Link' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'react-router-dom/matchPath' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'react-router-dom/MemoryRouter' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'react-router-dom/NavLink' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module 'react-router-dom/Prompt' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module 'react-router-dom/Redirect' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module 'react-router-dom/Route' { 114 | declare module.exports: any; 115 | } 116 | 117 | declare module 'react-router-dom/Router' { 118 | declare module.exports: any; 119 | } 120 | 121 | declare module 'react-router-dom/StaticRouter' { 122 | declare module.exports: any; 123 | } 124 | 125 | declare module 'react-router-dom/Switch' { 126 | declare module.exports: any; 127 | } 128 | 129 | declare module 'react-router-dom/umd/react-router-dom' { 130 | declare module.exports: any; 131 | } 132 | 133 | declare module 'react-router-dom/umd/react-router-dom.min' { 134 | declare module.exports: any; 135 | } 136 | 137 | declare module 'react-router-dom/withRouter' { 138 | declare module.exports: any; 139 | } 140 | 141 | // Filename aliases 142 | declare module 'react-router-dom/BrowserRouter.js' { 143 | declare module.exports: $Exports<'react-router-dom/BrowserRouter'>; 144 | } 145 | declare module 'react-router-dom/es/BrowserRouter.js' { 146 | declare module.exports: $Exports<'react-router-dom/es/BrowserRouter'>; 147 | } 148 | declare module 'react-router-dom/es/HashRouter.js' { 149 | declare module.exports: $Exports<'react-router-dom/es/HashRouter'>; 150 | } 151 | declare module 'react-router-dom/es/index.js' { 152 | declare module.exports: $Exports<'react-router-dom/es/index'>; 153 | } 154 | declare module 'react-router-dom/es/Link.js' { 155 | declare module.exports: $Exports<'react-router-dom/es/Link'>; 156 | } 157 | declare module 'react-router-dom/es/matchPath.js' { 158 | declare module.exports: $Exports<'react-router-dom/es/matchPath'>; 159 | } 160 | declare module 'react-router-dom/es/MemoryRouter.js' { 161 | declare module.exports: $Exports<'react-router-dom/es/MemoryRouter'>; 162 | } 163 | declare module 'react-router-dom/es/NavLink.js' { 164 | declare module.exports: $Exports<'react-router-dom/es/NavLink'>; 165 | } 166 | declare module 'react-router-dom/es/Prompt.js' { 167 | declare module.exports: $Exports<'react-router-dom/es/Prompt'>; 168 | } 169 | declare module 'react-router-dom/es/Redirect.js' { 170 | declare module.exports: $Exports<'react-router-dom/es/Redirect'>; 171 | } 172 | declare module 'react-router-dom/es/Route.js' { 173 | declare module.exports: $Exports<'react-router-dom/es/Route'>; 174 | } 175 | declare module 'react-router-dom/es/Router.js' { 176 | declare module.exports: $Exports<'react-router-dom/es/Router'>; 177 | } 178 | declare module 'react-router-dom/es/StaticRouter.js' { 179 | declare module.exports: $Exports<'react-router-dom/es/StaticRouter'>; 180 | } 181 | declare module 'react-router-dom/es/Switch.js' { 182 | declare module.exports: $Exports<'react-router-dom/es/Switch'>; 183 | } 184 | declare module 'react-router-dom/es/withRouter.js' { 185 | declare module.exports: $Exports<'react-router-dom/es/withRouter'>; 186 | } 187 | declare module 'react-router-dom/HashRouter.js' { 188 | declare module.exports: $Exports<'react-router-dom/HashRouter'>; 189 | } 190 | declare module 'react-router-dom/index' { 191 | declare module.exports: $Exports<'react-router-dom'>; 192 | } 193 | declare module 'react-router-dom/index.js' { 194 | declare module.exports: $Exports<'react-router-dom'>; 195 | } 196 | declare module 'react-router-dom/Link.js' { 197 | declare module.exports: $Exports<'react-router-dom/Link'>; 198 | } 199 | declare module 'react-router-dom/matchPath.js' { 200 | declare module.exports: $Exports<'react-router-dom/matchPath'>; 201 | } 202 | declare module 'react-router-dom/MemoryRouter.js' { 203 | declare module.exports: $Exports<'react-router-dom/MemoryRouter'>; 204 | } 205 | declare module 'react-router-dom/NavLink.js' { 206 | declare module.exports: $Exports<'react-router-dom/NavLink'>; 207 | } 208 | declare module 'react-router-dom/Prompt.js' { 209 | declare module.exports: $Exports<'react-router-dom/Prompt'>; 210 | } 211 | declare module 'react-router-dom/Redirect.js' { 212 | declare module.exports: $Exports<'react-router-dom/Redirect'>; 213 | } 214 | declare module 'react-router-dom/Route.js' { 215 | declare module.exports: $Exports<'react-router-dom/Route'>; 216 | } 217 | declare module 'react-router-dom/Router.js' { 218 | declare module.exports: $Exports<'react-router-dom/Router'>; 219 | } 220 | declare module 'react-router-dom/StaticRouter.js' { 221 | declare module.exports: $Exports<'react-router-dom/StaticRouter'>; 222 | } 223 | declare module 'react-router-dom/Switch.js' { 224 | declare module.exports: $Exports<'react-router-dom/Switch'>; 225 | } 226 | declare module 'react-router-dom/umd/react-router-dom.js' { 227 | declare module.exports: $Exports<'react-router-dom/umd/react-router-dom'>; 228 | } 229 | declare module 'react-router-dom/umd/react-router-dom.min.js' { 230 | declare module.exports: $Exports<'react-router-dom/umd/react-router-dom.min'>; 231 | } 232 | declare module 'react-router-dom/withRouter.js' { 233 | declare module.exports: $Exports<'react-router-dom/withRouter'>; 234 | } 235 | -------------------------------------------------------------------------------- /flow-typed/npm/react-router_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 1badec30910c0822901968f2fe5f6a3b 2 | // flow-typed version: <>/react-router_v^4.1.2/flow_v0.53.1 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'react-router' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'react-router' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'react-router/es/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'react-router/es/matchPath' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'react-router/es/MemoryRouter' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'react-router/es/Prompt' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'react-router/es/Redirect' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'react-router/es/Route' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'react-router/es/Router' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'react-router/es/StaticRouter' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'react-router/es/Switch' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'react-router/es/withRouter' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'react-router/matchPath' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'react-router/MemoryRouter' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'react-router/Prompt' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'react-router/Redirect' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'react-router/Route' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'react-router/Router' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'react-router/StaticRouter' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'react-router/Switch' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'react-router/umd/react-router' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'react-router/umd/react-router.min' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module 'react-router/withRouter' { 106 | declare module.exports: any; 107 | } 108 | 109 | // Filename aliases 110 | declare module 'react-router/es/index.js' { 111 | declare module.exports: $Exports<'react-router/es/index'>; 112 | } 113 | declare module 'react-router/es/matchPath.js' { 114 | declare module.exports: $Exports<'react-router/es/matchPath'>; 115 | } 116 | declare module 'react-router/es/MemoryRouter.js' { 117 | declare module.exports: $Exports<'react-router/es/MemoryRouter'>; 118 | } 119 | declare module 'react-router/es/Prompt.js' { 120 | declare module.exports: $Exports<'react-router/es/Prompt'>; 121 | } 122 | declare module 'react-router/es/Redirect.js' { 123 | declare module.exports: $Exports<'react-router/es/Redirect'>; 124 | } 125 | declare module 'react-router/es/Route.js' { 126 | declare module.exports: $Exports<'react-router/es/Route'>; 127 | } 128 | declare module 'react-router/es/Router.js' { 129 | declare module.exports: $Exports<'react-router/es/Router'>; 130 | } 131 | declare module 'react-router/es/StaticRouter.js' { 132 | declare module.exports: $Exports<'react-router/es/StaticRouter'>; 133 | } 134 | declare module 'react-router/es/Switch.js' { 135 | declare module.exports: $Exports<'react-router/es/Switch'>; 136 | } 137 | declare module 'react-router/es/withRouter.js' { 138 | declare module.exports: $Exports<'react-router/es/withRouter'>; 139 | } 140 | declare module 'react-router/index' { 141 | declare module.exports: $Exports<'react-router'>; 142 | } 143 | declare module 'react-router/index.js' { 144 | declare module.exports: $Exports<'react-router'>; 145 | } 146 | declare module 'react-router/matchPath.js' { 147 | declare module.exports: $Exports<'react-router/matchPath'>; 148 | } 149 | declare module 'react-router/MemoryRouter.js' { 150 | declare module.exports: $Exports<'react-router/MemoryRouter'>; 151 | } 152 | declare module 'react-router/Prompt.js' { 153 | declare module.exports: $Exports<'react-router/Prompt'>; 154 | } 155 | declare module 'react-router/Redirect.js' { 156 | declare module.exports: $Exports<'react-router/Redirect'>; 157 | } 158 | declare module 'react-router/Route.js' { 159 | declare module.exports: $Exports<'react-router/Route'>; 160 | } 161 | declare module 'react-router/Router.js' { 162 | declare module.exports: $Exports<'react-router/Router'>; 163 | } 164 | declare module 'react-router/StaticRouter.js' { 165 | declare module.exports: $Exports<'react-router/StaticRouter'>; 166 | } 167 | declare module 'react-router/Switch.js' { 168 | declare module.exports: $Exports<'react-router/Switch'>; 169 | } 170 | declare module 'react-router/umd/react-router.js' { 171 | declare module.exports: $Exports<'react-router/umd/react-router'>; 172 | } 173 | declare module 'react-router/umd/react-router.min.js' { 174 | declare module.exports: $Exports<'react-router/umd/react-router.min'>; 175 | } 176 | declare module 'react-router/withRouter.js' { 177 | declare module.exports: $Exports<'react-router/withRouter'>; 178 | } 179 | -------------------------------------------------------------------------------- /flow-typed/npm/react-scripts_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 86fc485e18ff280b037ccdf7267c45da 2 | // flow-typed version: <>/react-scripts_v1.0.11/flow_v0.53.1 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'react-scripts' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'react-scripts' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'react-scripts/bin/react-scripts' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'react-scripts/config/env' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'react-scripts/config/jest/babelTransform' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'react-scripts/config/jest/cssTransform' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'react-scripts/config/jest/fileTransform' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'react-scripts/config/paths' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'react-scripts/config/polyfills' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'react-scripts/config/webpack.config.dev' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'react-scripts/config/webpack.config.prod' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'react-scripts/config/webpackDevServer.config' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'react-scripts/scripts/build' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'react-scripts/scripts/eject' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'react-scripts/scripts/init' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'react-scripts/scripts/start' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'react-scripts/scripts/test' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'react-scripts/scripts/utils/createJestConfig' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'react-scripts/template/src/App' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'react-scripts/template/src/App.test' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'react-scripts/template/src/index' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'react-scripts/template/src/registerServiceWorker' { 102 | declare module.exports: any; 103 | } 104 | 105 | // Filename aliases 106 | declare module 'react-scripts/bin/react-scripts.js' { 107 | declare module.exports: $Exports<'react-scripts/bin/react-scripts'>; 108 | } 109 | declare module 'react-scripts/config/env.js' { 110 | declare module.exports: $Exports<'react-scripts/config/env'>; 111 | } 112 | declare module 'react-scripts/config/jest/babelTransform.js' { 113 | declare module.exports: $Exports<'react-scripts/config/jest/babelTransform'>; 114 | } 115 | declare module 'react-scripts/config/jest/cssTransform.js' { 116 | declare module.exports: $Exports<'react-scripts/config/jest/cssTransform'>; 117 | } 118 | declare module 'react-scripts/config/jest/fileTransform.js' { 119 | declare module.exports: $Exports<'react-scripts/config/jest/fileTransform'>; 120 | } 121 | declare module 'react-scripts/config/paths.js' { 122 | declare module.exports: $Exports<'react-scripts/config/paths'>; 123 | } 124 | declare module 'react-scripts/config/polyfills.js' { 125 | declare module.exports: $Exports<'react-scripts/config/polyfills'>; 126 | } 127 | declare module 'react-scripts/config/webpack.config.dev.js' { 128 | declare module.exports: $Exports<'react-scripts/config/webpack.config.dev'>; 129 | } 130 | declare module 'react-scripts/config/webpack.config.prod.js' { 131 | declare module.exports: $Exports<'react-scripts/config/webpack.config.prod'>; 132 | } 133 | declare module 'react-scripts/config/webpackDevServer.config.js' { 134 | declare module.exports: $Exports<'react-scripts/config/webpackDevServer.config'>; 135 | } 136 | declare module 'react-scripts/scripts/build.js' { 137 | declare module.exports: $Exports<'react-scripts/scripts/build'>; 138 | } 139 | declare module 'react-scripts/scripts/eject.js' { 140 | declare module.exports: $Exports<'react-scripts/scripts/eject'>; 141 | } 142 | declare module 'react-scripts/scripts/init.js' { 143 | declare module.exports: $Exports<'react-scripts/scripts/init'>; 144 | } 145 | declare module 'react-scripts/scripts/start.js' { 146 | declare module.exports: $Exports<'react-scripts/scripts/start'>; 147 | } 148 | declare module 'react-scripts/scripts/test.js' { 149 | declare module.exports: $Exports<'react-scripts/scripts/test'>; 150 | } 151 | declare module 'react-scripts/scripts/utils/createJestConfig.js' { 152 | declare module.exports: $Exports<'react-scripts/scripts/utils/createJestConfig'>; 153 | } 154 | declare module 'react-scripts/template/src/App.js' { 155 | declare module.exports: $Exports<'react-scripts/template/src/App'>; 156 | } 157 | declare module 'react-scripts/template/src/App.test.js' { 158 | declare module.exports: $Exports<'react-scripts/template/src/App.test'>; 159 | } 160 | declare module 'react-scripts/template/src/index.js' { 161 | declare module.exports: $Exports<'react-scripts/template/src/index'>; 162 | } 163 | declare module 'react-scripts/template/src/registerServiceWorker.js' { 164 | declare module.exports: $Exports<'react-scripts/template/src/registerServiceWorker'>; 165 | } 166 | -------------------------------------------------------------------------------- /flow-typed/npm/redux-saga-test-engine_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: fd942663e05a62f35ecc70424e2418f3 2 | // flow-typed version: <>/redux-saga-test-engine_v^2.0.3/flow_v0.53.1 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'redux-saga-test-engine' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'redux-saga-test-engine' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'redux-saga-test-engine/build/core' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'redux-saga-test-engine/build/index' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'redux-saga-test-engine/sagas/index' { 34 | declare module.exports: any; 35 | } 36 | 37 | // Filename aliases 38 | declare module 'redux-saga-test-engine/build/core.js' { 39 | declare module.exports: $Exports<'redux-saga-test-engine/build/core'>; 40 | } 41 | declare module 'redux-saga-test-engine/build/index.js' { 42 | declare module.exports: $Exports<'redux-saga-test-engine/build/index'>; 43 | } 44 | declare module 'redux-saga-test-engine/sagas/index.js' { 45 | declare module.exports: $Exports<'redux-saga-test-engine/sagas/index'>; 46 | } 47 | -------------------------------------------------------------------------------- /flow-typed/npm/redux-saga_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 6bf9d524f032f532d0588b27905b9b24 2 | // flow-typed version: <>/redux-saga_v^0.15.6/flow_v0.53.1 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'redux-saga' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'redux-saga' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'redux-saga/dist/redux-saga' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'redux-saga/dist/redux-saga.min' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'redux-saga/es/effects' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'redux-saga/es/index' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'redux-saga/es/internal/buffers' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'redux-saga/es/internal/channel' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'redux-saga/es/internal/io' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'redux-saga/es/internal/middleware' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'redux-saga/es/internal/proc' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'redux-saga/es/internal/runSaga' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'redux-saga/es/internal/sagaHelpers/fsmIterator' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'redux-saga/es/internal/sagaHelpers/index' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'redux-saga/es/internal/sagaHelpers/takeEvery' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'redux-saga/es/internal/sagaHelpers/takeLatest' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'redux-saga/es/internal/sagaHelpers/throttle' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'redux-saga/es/internal/scheduler' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'redux-saga/es/internal/utils' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'redux-saga/es/utils' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'redux-saga/lib/effects' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'redux-saga/lib/index' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module 'redux-saga/lib/internal/buffers' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module 'redux-saga/lib/internal/channel' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module 'redux-saga/lib/internal/io' { 114 | declare module.exports: any; 115 | } 116 | 117 | declare module 'redux-saga/lib/internal/middleware' { 118 | declare module.exports: any; 119 | } 120 | 121 | declare module 'redux-saga/lib/internal/proc' { 122 | declare module.exports: any; 123 | } 124 | 125 | declare module 'redux-saga/lib/internal/runSaga' { 126 | declare module.exports: any; 127 | } 128 | 129 | declare module 'redux-saga/lib/internal/sagaHelpers/fsmIterator' { 130 | declare module.exports: any; 131 | } 132 | 133 | declare module 'redux-saga/lib/internal/sagaHelpers/index' { 134 | declare module.exports: any; 135 | } 136 | 137 | declare module 'redux-saga/lib/internal/sagaHelpers/takeEvery' { 138 | declare module.exports: any; 139 | } 140 | 141 | declare module 'redux-saga/lib/internal/sagaHelpers/takeLatest' { 142 | declare module.exports: any; 143 | } 144 | 145 | declare module 'redux-saga/lib/internal/sagaHelpers/throttle' { 146 | declare module.exports: any; 147 | } 148 | 149 | declare module 'redux-saga/lib/internal/scheduler' { 150 | declare module.exports: any; 151 | } 152 | 153 | declare module 'redux-saga/lib/internal/utils' { 154 | declare module.exports: any; 155 | } 156 | 157 | declare module 'redux-saga/lib/utils' { 158 | declare module.exports: any; 159 | } 160 | 161 | declare module 'redux-saga/rollup.config' { 162 | declare module.exports: any; 163 | } 164 | 165 | declare module 'redux-saga/src/effects' { 166 | declare module.exports: any; 167 | } 168 | 169 | declare module 'redux-saga/src/index' { 170 | declare module.exports: any; 171 | } 172 | 173 | declare module 'redux-saga/src/internal/buffers' { 174 | declare module.exports: any; 175 | } 176 | 177 | declare module 'redux-saga/src/internal/channel' { 178 | declare module.exports: any; 179 | } 180 | 181 | declare module 'redux-saga/src/internal/io' { 182 | declare module.exports: any; 183 | } 184 | 185 | declare module 'redux-saga/src/internal/middleware' { 186 | declare module.exports: any; 187 | } 188 | 189 | declare module 'redux-saga/src/internal/proc' { 190 | declare module.exports: any; 191 | } 192 | 193 | declare module 'redux-saga/src/internal/runSaga' { 194 | declare module.exports: any; 195 | } 196 | 197 | declare module 'redux-saga/src/internal/sagaHelpers/fsmIterator' { 198 | declare module.exports: any; 199 | } 200 | 201 | declare module 'redux-saga/src/internal/sagaHelpers/index' { 202 | declare module.exports: any; 203 | } 204 | 205 | declare module 'redux-saga/src/internal/sagaHelpers/takeEvery' { 206 | declare module.exports: any; 207 | } 208 | 209 | declare module 'redux-saga/src/internal/sagaHelpers/takeLatest' { 210 | declare module.exports: any; 211 | } 212 | 213 | declare module 'redux-saga/src/internal/sagaHelpers/throttle' { 214 | declare module.exports: any; 215 | } 216 | 217 | declare module 'redux-saga/src/internal/scheduler' { 218 | declare module.exports: any; 219 | } 220 | 221 | declare module 'redux-saga/src/internal/utils' { 222 | declare module.exports: any; 223 | } 224 | 225 | declare module 'redux-saga/src/utils' { 226 | declare module.exports: any; 227 | } 228 | 229 | // Filename aliases 230 | declare module 'redux-saga/dist/redux-saga.js' { 231 | declare module.exports: $Exports<'redux-saga/dist/redux-saga'>; 232 | } 233 | declare module 'redux-saga/dist/redux-saga.min.js' { 234 | declare module.exports: $Exports<'redux-saga/dist/redux-saga.min'>; 235 | } 236 | declare module 'redux-saga/es/effects.js' { 237 | declare module.exports: $Exports<'redux-saga/es/effects'>; 238 | } 239 | declare module 'redux-saga/es/index.js' { 240 | declare module.exports: $Exports<'redux-saga/es/index'>; 241 | } 242 | declare module 'redux-saga/es/internal/buffers.js' { 243 | declare module.exports: $Exports<'redux-saga/es/internal/buffers'>; 244 | } 245 | declare module 'redux-saga/es/internal/channel.js' { 246 | declare module.exports: $Exports<'redux-saga/es/internal/channel'>; 247 | } 248 | declare module 'redux-saga/es/internal/io.js' { 249 | declare module.exports: $Exports<'redux-saga/es/internal/io'>; 250 | } 251 | declare module 'redux-saga/es/internal/middleware.js' { 252 | declare module.exports: $Exports<'redux-saga/es/internal/middleware'>; 253 | } 254 | declare module 'redux-saga/es/internal/proc.js' { 255 | declare module.exports: $Exports<'redux-saga/es/internal/proc'>; 256 | } 257 | declare module 'redux-saga/es/internal/runSaga.js' { 258 | declare module.exports: $Exports<'redux-saga/es/internal/runSaga'>; 259 | } 260 | declare module 'redux-saga/es/internal/sagaHelpers/fsmIterator.js' { 261 | declare module.exports: $Exports<'redux-saga/es/internal/sagaHelpers/fsmIterator'>; 262 | } 263 | declare module 'redux-saga/es/internal/sagaHelpers/index.js' { 264 | declare module.exports: $Exports<'redux-saga/es/internal/sagaHelpers/index'>; 265 | } 266 | declare module 'redux-saga/es/internal/sagaHelpers/takeEvery.js' { 267 | declare module.exports: $Exports<'redux-saga/es/internal/sagaHelpers/takeEvery'>; 268 | } 269 | declare module 'redux-saga/es/internal/sagaHelpers/takeLatest.js' { 270 | declare module.exports: $Exports<'redux-saga/es/internal/sagaHelpers/takeLatest'>; 271 | } 272 | declare module 'redux-saga/es/internal/sagaHelpers/throttle.js' { 273 | declare module.exports: $Exports<'redux-saga/es/internal/sagaHelpers/throttle'>; 274 | } 275 | declare module 'redux-saga/es/internal/scheduler.js' { 276 | declare module.exports: $Exports<'redux-saga/es/internal/scheduler'>; 277 | } 278 | declare module 'redux-saga/es/internal/utils.js' { 279 | declare module.exports: $Exports<'redux-saga/es/internal/utils'>; 280 | } 281 | declare module 'redux-saga/es/utils.js' { 282 | declare module.exports: $Exports<'redux-saga/es/utils'>; 283 | } 284 | declare module 'redux-saga/lib/effects.js' { 285 | declare module.exports: $Exports<'redux-saga/lib/effects'>; 286 | } 287 | declare module 'redux-saga/lib/index.js' { 288 | declare module.exports: $Exports<'redux-saga/lib/index'>; 289 | } 290 | declare module 'redux-saga/lib/internal/buffers.js' { 291 | declare module.exports: $Exports<'redux-saga/lib/internal/buffers'>; 292 | } 293 | declare module 'redux-saga/lib/internal/channel.js' { 294 | declare module.exports: $Exports<'redux-saga/lib/internal/channel'>; 295 | } 296 | declare module 'redux-saga/lib/internal/io.js' { 297 | declare module.exports: $Exports<'redux-saga/lib/internal/io'>; 298 | } 299 | declare module 'redux-saga/lib/internal/middleware.js' { 300 | declare module.exports: $Exports<'redux-saga/lib/internal/middleware'>; 301 | } 302 | declare module 'redux-saga/lib/internal/proc.js' { 303 | declare module.exports: $Exports<'redux-saga/lib/internal/proc'>; 304 | } 305 | declare module 'redux-saga/lib/internal/runSaga.js' { 306 | declare module.exports: $Exports<'redux-saga/lib/internal/runSaga'>; 307 | } 308 | declare module 'redux-saga/lib/internal/sagaHelpers/fsmIterator.js' { 309 | declare module.exports: $Exports<'redux-saga/lib/internal/sagaHelpers/fsmIterator'>; 310 | } 311 | declare module 'redux-saga/lib/internal/sagaHelpers/index.js' { 312 | declare module.exports: $Exports<'redux-saga/lib/internal/sagaHelpers/index'>; 313 | } 314 | declare module 'redux-saga/lib/internal/sagaHelpers/takeEvery.js' { 315 | declare module.exports: $Exports<'redux-saga/lib/internal/sagaHelpers/takeEvery'>; 316 | } 317 | declare module 'redux-saga/lib/internal/sagaHelpers/takeLatest.js' { 318 | declare module.exports: $Exports<'redux-saga/lib/internal/sagaHelpers/takeLatest'>; 319 | } 320 | declare module 'redux-saga/lib/internal/sagaHelpers/throttle.js' { 321 | declare module.exports: $Exports<'redux-saga/lib/internal/sagaHelpers/throttle'>; 322 | } 323 | declare module 'redux-saga/lib/internal/scheduler.js' { 324 | declare module.exports: $Exports<'redux-saga/lib/internal/scheduler'>; 325 | } 326 | declare module 'redux-saga/lib/internal/utils.js' { 327 | declare module.exports: $Exports<'redux-saga/lib/internal/utils'>; 328 | } 329 | declare module 'redux-saga/lib/utils.js' { 330 | declare module.exports: $Exports<'redux-saga/lib/utils'>; 331 | } 332 | declare module 'redux-saga/rollup.config.js' { 333 | declare module.exports: $Exports<'redux-saga/rollup.config'>; 334 | } 335 | declare module 'redux-saga/src/effects.js' { 336 | declare module.exports: $Exports<'redux-saga/src/effects'>; 337 | } 338 | declare module 'redux-saga/src/index.js' { 339 | declare module.exports: $Exports<'redux-saga/src/index'>; 340 | } 341 | declare module 'redux-saga/src/internal/buffers.js' { 342 | declare module.exports: $Exports<'redux-saga/src/internal/buffers'>; 343 | } 344 | declare module 'redux-saga/src/internal/channel.js' { 345 | declare module.exports: $Exports<'redux-saga/src/internal/channel'>; 346 | } 347 | declare module 'redux-saga/src/internal/io.js' { 348 | declare module.exports: $Exports<'redux-saga/src/internal/io'>; 349 | } 350 | declare module 'redux-saga/src/internal/middleware.js' { 351 | declare module.exports: $Exports<'redux-saga/src/internal/middleware'>; 352 | } 353 | declare module 'redux-saga/src/internal/proc.js' { 354 | declare module.exports: $Exports<'redux-saga/src/internal/proc'>; 355 | } 356 | declare module 'redux-saga/src/internal/runSaga.js' { 357 | declare module.exports: $Exports<'redux-saga/src/internal/runSaga'>; 358 | } 359 | declare module 'redux-saga/src/internal/sagaHelpers/fsmIterator.js' { 360 | declare module.exports: $Exports<'redux-saga/src/internal/sagaHelpers/fsmIterator'>; 361 | } 362 | declare module 'redux-saga/src/internal/sagaHelpers/index.js' { 363 | declare module.exports: $Exports<'redux-saga/src/internal/sagaHelpers/index'>; 364 | } 365 | declare module 'redux-saga/src/internal/sagaHelpers/takeEvery.js' { 366 | declare module.exports: $Exports<'redux-saga/src/internal/sagaHelpers/takeEvery'>; 367 | } 368 | declare module 'redux-saga/src/internal/sagaHelpers/takeLatest.js' { 369 | declare module.exports: $Exports<'redux-saga/src/internal/sagaHelpers/takeLatest'>; 370 | } 371 | declare module 'redux-saga/src/internal/sagaHelpers/throttle.js' { 372 | declare module.exports: $Exports<'redux-saga/src/internal/sagaHelpers/throttle'>; 373 | } 374 | declare module 'redux-saga/src/internal/scheduler.js' { 375 | declare module.exports: $Exports<'redux-saga/src/internal/scheduler'>; 376 | } 377 | declare module 'redux-saga/src/internal/utils.js' { 378 | declare module.exports: $Exports<'redux-saga/src/internal/utils'>; 379 | } 380 | declare module 'redux-saga/src/utils.js' { 381 | declare module.exports: $Exports<'redux-saga/src/utils'>; 382 | } 383 | -------------------------------------------------------------------------------- /flow-typed/npm/redux_v3.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 86993bd000012d3e1ef10d757d16952d 2 | // flow-typed version: a165222d28/redux_v3.x.x/flow_>=v0.33.x 3 | 4 | declare module 'redux' { 5 | 6 | /* 7 | 8 | S = State 9 | A = Action 10 | D = Dispatch 11 | 12 | */ 13 | 14 | declare type DispatchAPI = (action: A) => A; 15 | declare type Dispatch }> = DispatchAPI; 16 | 17 | declare type MiddlewareAPI> = { 18 | dispatch: D; 19 | getState(): S; 20 | }; 21 | 22 | declare type Store> = { 23 | // rewrite MiddlewareAPI members in order to get nicer error messages (intersections produce long messages) 24 | dispatch: D; 25 | getState(): S; 26 | subscribe(listener: () => void): () => void; 27 | replaceReducer(nextReducer: Reducer): void 28 | }; 29 | 30 | declare type Reducer = (state: S, action: A) => S; 31 | 32 | declare type CombinedReducer = (state: $Shape & {} | void, action: A) => S; 33 | 34 | declare type Middleware> = 35 | (api: MiddlewareAPI) => 36 | (next: D) => D; 37 | 38 | declare type StoreCreator> = { 39 | (reducer: Reducer, enhancer?: StoreEnhancer): Store; 40 | (reducer: Reducer, preloadedState: S, enhancer?: StoreEnhancer): Store; 41 | }; 42 | 43 | declare type StoreEnhancer> = (next: StoreCreator) => StoreCreator; 44 | 45 | declare function createStore(reducer: Reducer, enhancer?: StoreEnhancer): Store; 46 | declare function createStore(reducer: Reducer, preloadedState: S, enhancer?: StoreEnhancer): Store; 47 | 48 | declare function applyMiddleware(...middlewares: Array>): StoreEnhancer; 49 | 50 | declare type ActionCreator = (...args: Array) => A; 51 | declare type ActionCreators = { [key: K]: ActionCreator }; 52 | 53 | declare function bindActionCreators, D: DispatchAPI>(actionCreator: C, dispatch: D): C; 54 | declare function bindActionCreators, D: DispatchAPI>(actionCreators: C, dispatch: D): C; 55 | 56 | declare function combineReducers(reducers: O): CombinedReducer<$ObjMap(r: Reducer) => S>, A>; 57 | 58 | declare function compose(ab: (a: A) => B): (a: A) => B 59 | declare function compose( 60 | bc: (b: B) => C, 61 | ab: (a: A) => B 62 | ): (a: A) => C 63 | declare function compose( 64 | cd: (c: C) => D, 65 | bc: (b: B) => C, 66 | ab: (a: A) => B 67 | ): (a: A) => D 68 | declare function compose( 69 | de: (d: D) => E, 70 | cd: (c: C) => D, 71 | bc: (b: B) => C, 72 | ab: (a: A) => B 73 | ): (a: A) => E 74 | declare function compose( 75 | ef: (e: E) => F, 76 | de: (d: D) => E, 77 | cd: (c: C) => D, 78 | bc: (b: B) => C, 79 | ab: (a: A) => B 80 | ): (a: A) => F 81 | declare function compose( 82 | fg: (f: F) => G, 83 | ef: (e: E) => F, 84 | de: (d: D) => E, 85 | cd: (c: C) => D, 86 | bc: (b: B) => C, 87 | ab: (a: A) => B 88 | ): (a: A) => G 89 | declare function compose( 90 | gh: (g: G) => H, 91 | fg: (f: F) => G, 92 | ef: (e: E) => F, 93 | de: (d: D) => E, 94 | cd: (c: C) => D, 95 | bc: (b: B) => C, 96 | ab: (a: A) => B 97 | ): (a: A) => H 98 | declare function compose( 99 | hi: (h: H) => I, 100 | gh: (g: G) => H, 101 | fg: (f: F) => G, 102 | ef: (e: E) => F, 103 | de: (d: D) => E, 104 | cd: (c: C) => D, 105 | bc: (b: B) => C, 106 | ab: (a: A) => B 107 | ): (a: A) => I 108 | 109 | } 110 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "quiz-simply-react", 3 | "version": "0.1.0", 4 | "private": true, 5 | "devDependencies": { 6 | "enzyme": "^2.9.1", 7 | "flow-coverage-report": "^0.3.0", 8 | "react-scripts": "1.0.11", 9 | "redux-saga-test-engine": "^2.0.3" 10 | }, 11 | "dependencies": { 12 | "flow-bin": "^0.53.1", 13 | "husky": "^0.14.3", 14 | "lint-staged": "^4.0.3", 15 | "prettier": "^1.5.3", 16 | "ramda": "^0.24.1", 17 | "react": "^15.6.1", 18 | "react-dom": "^15.6.1", 19 | "react-redux": "^5.0.6", 20 | "react-router": "^4.1.2", 21 | "react-router-dom": "^4.1.2", 22 | "redux": "^3.7.2", 23 | "redux-saga": "^0.15.6", 24 | "styled-components": "^2.1.2" 25 | }, 26 | "scripts": { 27 | "start": "react-scripts start", 28 | "build": "react-scripts build", 29 | "test": "react-scripts test --env=jsdom", 30 | "eject": "react-scripts eject", 31 | "precommit": "lint-staged", 32 | "flow": "flow", 33 | "flow:coverage": "flow-coverage-report -i \"./src/**/*.js\" -x \"./src/**/*.test.js\" -x \"./src/registerServiceWorker.js\" -x \"./src/index.js\" -x \"./src/configureStore.js\"", 34 | "ci": "yarn run flow && yarn run build && yarn test" 35 | }, 36 | "lint-staged": { 37 | "src/**/*.{js,jsx,json,css}": [ 38 | "prettier --single-quote --write --trailing-comma all", 39 | "git add" 40 | ] 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wsbrunson/Quiz-Simply-React/43c903aaa0a9be0fb0ac781d62f6e9c50c42e1c9/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 11 | 12 | 13 | 22 | React App 23 | 24 | 25 | 28 |

29 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "192x192", 8 | "type": "image/png" 9 | } 10 | ], 11 | "start_url": "./index.html", 12 | "display": "standalone", 13 | "theme_color": "#000000", 14 | "background_color": "#ffffff" 15 | } 16 | -------------------------------------------------------------------------------- /src/App.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react'; 3 | import { Provider } from 'react-redux'; 4 | import store from './configureStore'; 5 | 6 | import Routes from './components/Routes'; 7 | 8 | const App = () => 9 | 10 | 11 | ; 12 | 13 | export default App; 14 | -------------------------------------------------------------------------------- /src/components/LandingPage.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react'; 3 | import styled from 'styled-components'; 4 | import { Link } from 'react-router-dom'; 5 | 6 | const LandingPageMain = styled.div` 7 | display: flex; 8 | height: 100vh; 9 | `; 10 | 11 | const LandingPageLeft = styled.div` 12 | display: flex; 13 | align-items: center; 14 | width: 70%; 15 | `; 16 | 17 | const LandingPageRight = styled.div` 18 | display: flex; 19 | justify-content: center; 20 | align-items: center; 21 | width: 30%; 22 | `; 23 | 24 | const LandingPageTitle = styled.div`word-spacing: 9999999px;`; 25 | 26 | const TakeQuickButton = styled.button` 27 | height: 5em; 28 | width: 14em; 29 | `; 30 | 31 | const LandingPage = () => 32 | 33 | 34 | Quiz Simply 35 | 36 | 37 | 38 | Take Quiz 39 | 40 | 41 | ; 42 | 43 | export default LandingPage; 44 | -------------------------------------------------------------------------------- /src/components/NoMatch.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react'; 3 | 4 | const NoMatch = () =>
Page Not found
; 5 | 6 | export default NoMatch; 7 | -------------------------------------------------------------------------------- /src/components/Routes.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react'; 3 | import { BrowserRouter as Router, Route, Switch } from 'react-router-dom'; 4 | 5 | import NoMatch from './NoMatch'; 6 | import QuizContainer from '../quiz/containers/QuizContainer'; 7 | 8 | const Routes = () => 9 | 10 | 11 | 12 | 13 | 14 | ; 15 | 16 | export default Routes; 17 | -------------------------------------------------------------------------------- /src/configureStore.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { createStore, applyMiddleware, compose } from 'redux'; 3 | import createSagaMiddleware from 'redux-saga'; 4 | 5 | import rootReducer from './rootReducer'; 6 | import fetchQuizSaga from './sagas/fetchQuizSaga'; 7 | 8 | const sagaMiddleware = createSagaMiddleware(); 9 | 10 | const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose; 11 | const store = createStore( 12 | rootReducer, 13 | {}, 14 | composeEnhancers(applyMiddleware(sagaMiddleware)), 15 | ); 16 | 17 | sagaMiddleware.run(fetchQuizSaga); 18 | 19 | export default store; 20 | -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | Simple JavaScript Quiz 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react'; 3 | import ReactDOM from 'react-dom'; 4 | import App from './App'; 5 | import registerServiceWorker from './registerServiceWorker'; 6 | 7 | ReactDOM.render(, document.getElementById('root')); 8 | registerServiceWorker(); 9 | -------------------------------------------------------------------------------- /src/quiz/__tests__/__snapshots__/quizReducer.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`Quiz Reducer requestQuizSucceeded should add questions to state 1`] = ` 4 | Object { 5 | "questions": Object { 6 | "0": Object { 7 | "id": 0, 8 | }, 9 | }, 10 | } 11 | `; 12 | -------------------------------------------------------------------------------- /src/quiz/__tests__/quizReducer.test.js: -------------------------------------------------------------------------------- 1 | import quizReducer from '../quizReducer'; 2 | 3 | import { requestQuizSucceeded } from '../quizActions'; 4 | 5 | describe('Quiz Reducer', () => { 6 | describe('requestQuizSucceeded', () => { 7 | it('should add questions to state', () => { 8 | const state = quizReducer( 9 | undefined, 10 | requestQuizSucceeded({ 11 | 0: { 12 | id: 0, 13 | }, 14 | }), 15 | ); 16 | 17 | expect(state).toMatchSnapshot(); 18 | }); 19 | }); 20 | }); 21 | -------------------------------------------------------------------------------- /src/quiz/components/Choice.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react'; 3 | import styled from 'styled-components'; 4 | 5 | export type TypeChoicePropTypes = { 6 | text: string, 7 | questionId: number, 8 | id: number, 9 | }; 10 | 11 | const Choice = ({ text, questionId, id }: TypeChoicePropTypes) => { 12 | const htmlId = `choice-${questionId}-${id}`; 13 | const htmlName = `question-${questionId}`; 14 | return ( 15 |
  • 16 | 17 | 20 |
  • 21 | ); 22 | }; 23 | 24 | const Label = styled.label`padding-left: 0.5em;`; 25 | 26 | export default Choice; 27 | -------------------------------------------------------------------------------- /src/quiz/components/Question.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React from 'react'; 3 | import styled from 'styled-components'; 4 | 5 | import Choice from './Choice'; 6 | 7 | import type { TypeChoice } from '../../types/TypeQuiz.flow'; 8 | 9 | type TypeProps = { 10 | text: string, 11 | choices: TypeChoice[], 12 | }; 13 | 14 | const renderChoices = (choice: TypeChoice) => 15 | ; 16 | 17 | const Question = ({ text, choices = [] }: TypeProps) => 18 | 19 | 20 | {text} 21 | 22 | 23 | {choices.map(renderChoices)} 24 | 25 | ; 26 | 27 | const QuestionMain = styled.li``; 28 | 29 | const QuestionTitle = styled.h3` 30 | text-align: center; 31 | background-color: darkblue; 32 | color: lightgoldenrodyellow; 33 | padding: 0.5em; 34 | box-shadow: 0.5em -0.5em cyan; 35 | `; 36 | 37 | const UnorderedList = styled.ul` 38 | list-style: none; 39 | padding-left: 1.2em; 40 | `; 41 | 42 | export default Question; 43 | -------------------------------------------------------------------------------- /src/quiz/components/Quiz.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import React, { Component } from 'react'; 3 | import styled from 'styled-components'; 4 | 5 | import type { 6 | TypeQuestionsArray, 7 | TypeQuestion, 8 | } from '../../types/TypeQuiz.flow'; 9 | 10 | import Question from './Question'; 11 | 12 | type TypeProps = { 13 | questions: TypeQuestionsArray, 14 | requestQuiz: () => void, 15 | }; 16 | 17 | class Quiz extends Component { 18 | defaultProps = { 19 | questions: [], 20 | }; 21 | 22 | componentDidMount() { 23 | this.props.requestQuiz(); 24 | console.log('mount'); 25 | } 26 | 27 | renderQuestions = (question: TypeQuestion) => 28 | ; 29 | 30 | render() { 31 | return ( 32 | 33 | 34 | Fun Time Quiz 35 | 36 | 37 |
      38 | {this.props.questions.map(this.renderQuestions)} 39 |
    40 |
    41 |
    42 | ); 43 | } 44 | } 45 | 46 | const QuizMain = styled.div` 47 | display: flex; 48 | justify-content: center; 49 | background-color: lightgoldenrodyellow; 50 | `; 51 | 52 | const QuizLeft = styled.div`width: 35%;`; 53 | 54 | const QuizTitle = styled.h2` 55 | text-align: right; 56 | text-transform: uppercase; 57 | `; 58 | 59 | const QuizRight = styled.div`width: 45%;`; 60 | 61 | export default Quiz; 62 | -------------------------------------------------------------------------------- /src/quiz/containers/QuizContainer.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { connect } from 'react-redux'; 3 | import { withRouter } from 'react-router-dom'; 4 | 5 | import Quiz from '../components/Quiz'; 6 | 7 | import { requestQuiz } from '../quizActions'; 8 | import { getAllQuestions } from '../quizSelectors'; 9 | 10 | import type { TypeStore } from '../../types/TypeStore.flow'; 11 | 12 | const mapStateToProps = (state: TypeStore) => ({ 13 | questions: getAllQuestions(state), 14 | }); 15 | 16 | export default withRouter( 17 | connect(mapStateToProps, { 18 | requestQuiz, 19 | })(Quiz), 20 | ); 21 | -------------------------------------------------------------------------------- /src/quiz/quizActions.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import type { TypeQuestionsMap } from '../types/TypeQuiz.flow'; 3 | 4 | const ActionTypes = { 5 | REQUEST_QUIZ: 'REQUEST_QUIZ', 6 | REQUEST_QUIZ_SUCCEEDED: 'REQUEST_QUIZ_SUCCEEDED', 7 | REQUEST_QUIZ_FAILED: 'REQUEST_QUIZ_FAILED', 8 | }; 9 | 10 | export type TypeRequestQuizAction = { 11 | type: typeof ActionTypes.REQUEST_QUIZ, 12 | }; 13 | 14 | const requestQuiz = () => ({ 15 | type: ActionTypes.REQUEST_QUIZ, 16 | }); 17 | 18 | export type TypeRequestQuizSucceededAction = { 19 | type: typeof ActionTypes.REQUEST_QUIZ_SUCCEEDED, 20 | payload: { 21 | questions: TypeQuestionsMap, 22 | }, 23 | }; 24 | 25 | const requestQuizSucceeded = (questions: TypeQuestionsMap) => ({ 26 | type: ActionTypes.REQUEST_QUIZ_SUCCEEDED, 27 | payload: { 28 | questions, 29 | }, 30 | }); 31 | 32 | export type TypeRequestQuizFailedAction = { 33 | type: typeof ActionTypes.REQUEST_QUIZ_FAILED, 34 | }; 35 | 36 | const requestQuizFailed = () => ({ 37 | type: ActionTypes.REQUEST_QUIZ_FAILED, 38 | }); 39 | 40 | export { ActionTypes, requestQuiz, requestQuizSucceeded, requestQuizFailed }; 41 | -------------------------------------------------------------------------------- /src/quiz/quizReducer.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { ActionTypes } from './quizActions'; 3 | import type { TypeAction } from '../types/TypeAction.flow'; 4 | import type { TypeQuestionsMap } from '../types/TypeQuiz.flow'; 5 | 6 | export type TypeQuizState = { 7 | questions: TypeQuestionsMap, 8 | }; 9 | 10 | const initialState = { 11 | questions: {}, 12 | }; 13 | 14 | export default (state: TypeQuizState = initialState, action: TypeAction) => { 15 | switch (action.type) { 16 | case ActionTypes.REQUEST_QUIZ_SUCCEEDED: 17 | return { 18 | ...state, 19 | questions: action.payload.questions, 20 | }; 21 | default: 22 | return state; 23 | } 24 | }; 25 | -------------------------------------------------------------------------------- /src/quiz/quizSelectors.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import type { TypeStore } from '../types/TypeStore.flow'; 3 | 4 | const getAllQuestions = (state: TypeStore) => { 5 | const questions = state.quiz.questions; 6 | const keys = Object.keys(questions); 7 | const array = []; 8 | 9 | keys.forEach(key => array.push(questions[key])); 10 | 11 | return array; 12 | }; 13 | 14 | export { getAllQuestions }; 15 | -------------------------------------------------------------------------------- /src/quizJSON.js: -------------------------------------------------------------------------------- 1 | export default { 2 | name: 'What Do You Know About This?', 3 | questions: [ 4 | { 5 | id: 0, 6 | text: "Grand Central Terminal, Park Avenue, New York is the world's", 7 | choices: [ 8 | { id: 0, text: 'largest railway station', questionId: 0 }, 9 | { id: 1, text: 'highest railway station', questionId: 0 }, 10 | { id: 2, text: 'longest railway station', questionId: 0 }, 11 | { id: 3, text: 'None of the above', questionId: 0 }, 12 | ], 13 | }, 14 | { 15 | id: 1, 16 | text: 'Entomology is the science that studies', 17 | choices: [ 18 | { id: 0, text: 'Behavior of human beings', questionId: 1 }, 19 | { id: 1, text: 'Insects', questionId: 1 }, 20 | { 21 | id: 2, 22 | text: 'The origin and history of technical and scientific terms', 23 | questionId: 1, 24 | }, 25 | { id: 3, text: 'The formation of rocks', questionId: 1 }, 26 | { id: 4, text: 'None of the above', questionId: 1 }, 27 | ], 28 | }, 29 | { 30 | id: 2, 31 | text: 'Friction can be reduced by changing from', 32 | choices: [ 33 | { id: 0, text: 'sliding to rollings', questionId: 2 }, 34 | { id: 1, text: 'rolling to sliding', questionId: 2 }, 35 | { id: 2, text: 'potential energy to kinetic energy', questionId: 2 }, 36 | { id: 3, text: 'dynamic to static', questionId: 2 }, 37 | ], 38 | }, 39 | { 40 | id: 3, 41 | text: 42 | 'For seeing objects at the surface of water from a submarine under water, the instrument used is', 43 | choices: [ 44 | { id: 0, text: 'kaleidoscope', questionId: 3 }, 45 | { id: 1, text: 'spectroscope', questionId: 3 }, 46 | { id: 2, text: 'periscope', questionId: 3 }, 47 | { id: 3, text: 'telescope', questionId: 3 }, 48 | ], 49 | }, 50 | { 51 | id: 4, 52 | text: 'Galileo was an Italian astronomer who', 53 | choices: [ 54 | { id: 0, text: 'developed the telescope', questionId: 4 }, 55 | { id: 1, text: 'discovered four satellites of Jupiter', questionId: 4 }, 56 | { 57 | id: 2, 58 | text: 59 | 'discovered that the movement of pendulum produces a regular time measurement', 60 | questionId: 4, 61 | }, 62 | { id: 3, text: 'All of the above', questionId: 4 }, 63 | ], 64 | }, 65 | ], 66 | }; 67 | -------------------------------------------------------------------------------- /src/registerServiceWorker.js: -------------------------------------------------------------------------------- 1 | // In production, we register a service worker to serve assets from local cache. 2 | 3 | // This lets the app load faster on subsequent visits in production, and gives 4 | // it offline capabilities. However, it also means that developers (and users) 5 | // will only see deployed updates on the "N+1" visit to a page, since previously 6 | // cached resources are updated in the background. 7 | 8 | // To learn more about the benefits of this model, read https://goo.gl/KwvDNy. 9 | // This link also includes instructions on opting out of this behavior. 10 | 11 | const isLocalhost = Boolean( 12 | window.location.hostname === 'localhost' || 13 | // [::1] is the IPv6 localhost address. 14 | window.location.hostname === '[::1]' || 15 | // 127.0.0.1/8 is considered localhost for IPv4. 16 | window.location.hostname.match( 17 | /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/, 18 | ), 19 | ); 20 | 21 | export default function register() { 22 | if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { 23 | // The URL constructor is available in all browsers that support SW. 24 | const publicUrl = new URL(process.env.PUBLIC_URL, window.location); 25 | if (publicUrl.origin !== window.location.origin) { 26 | // Our service worker won't work if PUBLIC_URL is on a different origin 27 | // from what our page is served on. This might happen if a CDN is used to 28 | // serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374 29 | return; 30 | } 31 | 32 | window.addEventListener('load', () => { 33 | const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; 34 | 35 | if (!isLocalhost) { 36 | // Is not local host. Just register service worker 37 | registerValidSW(swUrl); 38 | } else { 39 | // This is running on localhost. Lets check if a service worker still exists or not. 40 | checkValidServiceWorker(swUrl); 41 | } 42 | }); 43 | } 44 | } 45 | 46 | function registerValidSW(swUrl) { 47 | navigator.serviceWorker 48 | .register(swUrl) 49 | .then(registration => { 50 | registration.onupdatefound = () => { 51 | const installingWorker = registration.installing; 52 | installingWorker.onstatechange = () => { 53 | if (installingWorker.state === 'installed') { 54 | if (navigator.serviceWorker.controller) { 55 | // At this point, the old content will have been purged and 56 | // the fresh content will have been added to the cache. 57 | // It's the perfect time to display a "New content is 58 | // available; please refresh." message in your web app. 59 | console.log('New content is available; please refresh.'); 60 | } else { 61 | // At this point, everything has been precached. 62 | // It's the perfect time to display a 63 | // "Content is cached for offline use." message. 64 | console.log('Content is cached for offline use.'); 65 | } 66 | } 67 | }; 68 | }; 69 | }) 70 | .catch(error => { 71 | console.error('Error during service worker registration:', error); 72 | }); 73 | } 74 | 75 | function checkValidServiceWorker(swUrl) { 76 | // Check if the service worker can be found. If it can't reload the page. 77 | fetch(swUrl) 78 | .then(response => { 79 | // Ensure service worker exists, and that we really are getting a JS file. 80 | if ( 81 | response.status === 404 || 82 | response.headers.get('content-type').indexOf('javascript') === -1 83 | ) { 84 | // No service worker found. Probably a different app. Reload the page. 85 | navigator.serviceWorker.ready.then(registration => { 86 | registration.unregister().then(() => { 87 | window.location.reload(); 88 | }); 89 | }); 90 | } else { 91 | // Service worker found. Proceed as normal. 92 | registerValidSW(swUrl); 93 | } 94 | }) 95 | .catch(() => { 96 | console.log( 97 | 'No internet connection found. App is running in offline mode.', 98 | ); 99 | }); 100 | } 101 | 102 | export function unregister() { 103 | if ('serviceWorker' in navigator) { 104 | navigator.serviceWorker.ready.then(registration => { 105 | registration.unregister(); 106 | }); 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /src/rootReducer.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import { combineReducers } from 'redux'; 3 | 4 | import quizReducer from './quiz/quizReducer'; 5 | 6 | export default combineReducers({ 7 | quiz: quizReducer, 8 | }); 9 | -------------------------------------------------------------------------------- /src/sagas/__tests__/fetchQuizSaga.test.js: -------------------------------------------------------------------------------- 1 | import { collectPuts, throwError } from 'redux-saga-test-engine'; 2 | import { select, call, put } from 'redux-saga/effects'; 3 | 4 | import { fetchQuizWorker } from '../fetchQuizSaga'; 5 | 6 | import { fetchQuiz } from '../../services/quizService'; 7 | import { 8 | requestQuiz, 9 | requestQuizSucceeded, 10 | requestQuizFailed, 11 | } from '../../quiz/quizActions'; 12 | 13 | describe('Fetch Quiz Saga', () => { 14 | xdescribe('when quiz fetch succeeds', () => { 15 | it('should follow the fetch quiz succeeds pattern', () => {}); 16 | const quiz = { questions: ['the quiz'] }; 17 | const ENV = [[call(fetchQuiz), quiz]]; 18 | 19 | const actual = collectPuts(fetchQuizWorker, ENV, requestQuiz()); 20 | const expected = [put(requestQuizSucceeded(quiz.questions))]; 21 | 22 | expect(expected).toEqual(actual); 23 | }); 24 | 25 | xdescribe('when quiz fetch failes', () => { 26 | it('should follow the fetch quiz failed pattern', () => {}); 27 | const ENV = [[call(fetchQuiz), throwError()]]; 28 | 29 | const actual = collectPuts(fetchQuizWorker, ENV, requestQuiz()); 30 | const expected = [put(requestQuizFailed())]; 31 | 32 | expect(expected).toEqual(actual); 33 | }); 34 | }); 35 | -------------------------------------------------------------------------------- /src/sagas/fetchQuizSaga.js: -------------------------------------------------------------------------------- 1 | import { call, put, takeLatest } from 'redux-saga/effects'; 2 | 3 | import { fetchQuiz } from '../services/quizService'; 4 | import { 5 | ActionTypes, 6 | requestQuizSucceeded, 7 | requestQuizFailed, 8 | } from '../quiz/quizActions'; 9 | 10 | import type { TypeApiQuiz, TypeAppQuiz } from '../types/TypeQuiz.flow'; 11 | 12 | function* fetchQuizWorker() { 13 | try { 14 | const { questions }: TypeApiQuiz = yield call(fetchQuiz); 15 | const questionsMap: TypeAppQuiz = questions.reduce((map, question) => { 16 | map[question.id] = question; 17 | return map; 18 | }, {}); 19 | yield put(requestQuizSucceeded(questionsMap)); 20 | } catch (e) { 21 | yield requestQuizFailed(); 22 | } 23 | } 24 | 25 | function* fetchQuizSaga() { 26 | yield takeLatest(ActionTypes.REQUEST_QUIZ, fetchQuizWorker); 27 | } 28 | 29 | export { fetchQuizWorker }; 30 | 31 | export default fetchQuizSaga; 32 | -------------------------------------------------------------------------------- /src/services/quizService.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import QUIZ_DATA from '../quizJSON'; 3 | 4 | const fetchQuiz = () => Promise.resolve(QUIZ_DATA); 5 | 6 | export { fetchQuiz }; 7 | -------------------------------------------------------------------------------- /src/types/TypeAction.flow.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import type { 3 | TypeRequestQuizAction, 4 | TypeRequestQuizSucceededAction, 5 | TypeRequestQuizFailedAction, 6 | } from '../quiz/quizActions'; 7 | 8 | export type TypeAction = 9 | | TypeRequestQuizAction 10 | | TypeRequestQuizSucceededAction 11 | | TypeRequestQuizFailedAction; 12 | -------------------------------------------------------------------------------- /src/types/TypeQuiz.flow.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | export type TypeChoice = { 3 | id: number, 4 | text: string, 5 | questionId: number, 6 | }; 7 | 8 | export type TypeQuestion = { 9 | id: number, 10 | text: string, 11 | choices: TypeChoice[], 12 | }; 13 | 14 | export type TypeQuestionsMap = { 15 | [id: string]: TypeQuestion, 16 | }; 17 | 18 | export type TypeQuestionsArray = TypeQuestion[]; 19 | 20 | export type TypeApiQuiz = { 21 | name: string, 22 | questions: TypeQuestionsArray, 23 | }; 24 | 25 | export type TypeAppQuiz = { 26 | questions: TypeQuestionsMap, 27 | }; 28 | -------------------------------------------------------------------------------- /src/types/TypeStore.flow.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | import type { TypeQuizState } from '../quiz/quizReducer'; 3 | 4 | export type TypeStore = { 5 | quiz: TypeQuizState, 6 | }; 7 | -------------------------------------------------------------------------------- /todo.txt: -------------------------------------------------------------------------------- 1 | - Submit Quiz 2 | - should check that quiz is complete 3 | - should grade quiz 4 | - Grade Quiz 5 | - show score 6 | - show correct and incorrect answers 7 | - allow quiz maker to toggle show incorrect answers or correct answers 8 | - One question per page 9 | - Next button 10 | - Previous Button 11 | - Proceed on Selection 12 | --------------------------------------------------------------------------------