Repository: devlucky/Kakapo.js Branch: master Commit: a578cc918d92 Files: 69 Total size: 305.8 KB Directory structure: gitextract_xt59y45s/ ├── .editorconfig ├── .eslintrc ├── .gitignore ├── .travis.yml ├── CHANGELOG.md ├── LICENSE ├── README.md ├── __tests__/ │ ├── data/ │ │ └── users.ts │ ├── database_spec.ts │ ├── request_spec.ts │ ├── response_spec.ts │ ├── router_spec.ts │ └── server_spec.ts ├── create-readme.js ├── examples/ │ ├── dummy/ │ │ ├── .gitignore │ │ ├── README.md │ │ ├── bower.json │ │ ├── index.html │ │ └── package.json │ ├── github-explorer/ │ │ ├── .firebaserc │ │ ├── README.md │ │ ├── database.rules.json │ │ ├── firebase.json │ │ ├── index.html │ │ ├── package.json │ │ ├── styles.css │ │ └── styles.scss │ ├── react/ │ │ ├── .nvmrc │ │ ├── example/ │ │ │ ├── app.tsx │ │ │ ├── index.html │ │ │ ├── index.tsx │ │ │ └── styled.ts │ │ ├── package.json │ │ └── tsconfig.json │ └── todo-app/ │ ├── .firebaserc │ ├── README.md │ ├── database.rules.json │ ├── firebase.json │ ├── index.html │ └── package.json ├── flow-typed/ │ └── npm/ │ ├── jest_v22.x.x.js │ └── lodash_v4.x.x.js ├── jest.config.js ├── jestFrameworkSetup.js ├── md/ │ ├── end.md │ └── start.md ├── package.json ├── perf/ │ └── index.js ├── src/ │ ├── Database/ │ │ └── index.ts │ ├── Request/ │ │ └── index.ts │ ├── Response/ │ │ └── index.ts │ ├── Router/ │ │ └── index.ts │ ├── Server/ │ │ └── index.ts │ ├── config/ │ │ └── environment.ts │ ├── index.ts │ ├── interceptors/ │ │ ├── fetchInterceptor.ts │ │ ├── index.ts │ │ ├── interceptorHelper.ts │ │ └── xhrInterceptor.ts │ ├── serializers/ │ │ ├── index.ts │ │ └── json-api.ts │ └── utils.ts ├── tsconfig.dist.json ├── tsconfig.json ├── typings/ │ ├── parse-url/ │ │ └── index.d.ts │ ├── path-match/ │ │ └── index.d.ts │ └── query-string/ │ └── index.d.ts ├── webpack.config.js └── webpack.perf.config.js ================================================ FILE CONTENTS ================================================ ================================================ FILE: .editorconfig ================================================ root = true [*] charset = utf-8 end_of_line = lf indent_style = space insert_final_newline = true trim_trailing_whitespace = true [{*.js, *.json, *.yml}] indent_size = 2 [*.md] trim_trailing_whitespace = false [Makefile] indent_style = tab ================================================ FILE: .eslintrc ================================================ { "parser": "@typescript-eslint/parser", "parserOptions": { "ecmaVersion": 2018, "sourceType": "module" }, "rules": { "indent": ["error", 2], "typescript/no-explicit-any": "off", "typescript/explicit-function-return-type": "off" } } ================================================ FILE: .gitignore ================================================ *~ .directory .Trash-* logs *.log pids *.pid *.seed lib-cov .lock-wscript build/Release node_modules dist/ npm-debug.log npm-debug.log* .DS_Store .AppleDouble .LSOverride Icon ._* .Spotlight-V100 .Trashes .AppleDB .AppleDesktop Network Trash Folder Temporary Items .apdisk *.tmlanguage.cache *.tmPreferences.cache *.stTheme.cache *.sublime-workspace sftp-config.json lib package-lock.json coverage .vscode /.idea /examples/**/*.js ================================================ FILE: .travis.yml ================================================ language: node_js node_js: - '8' cache: yarn script: - yarn - yarn test:ci notifications: email: false ================================================ FILE: CHANGELOG.md ================================================ n.n.n / 2016-06-16 ================== * Merge pull request #121 from devlucky/feature/disconnect * v0.2.0 v0.2.0 / 2016-06-13 =================== * v0.2.0 * Implement disconnect feature * Merge pull request #120 from devlucky/chore/record_factory_side_effects * Ensure Interceptors response doesn't contain record-factory methods * Merge pull request #118 from devlucky/bugfix/update_demo * Adapt kakapo changes in demos * Merge pull request #117 from devlucky/bugfix/not_require_index_module * v0.1.4 v0.1.4 / 2016-06-12 =================== * v0.1.4 * Dont require index option * Merge pull request #115 from devlucky/docs_update docs_update / 2016-06-12 ======================== * Update docs * Merge pull request #109 from devlucky/chore/integration_tests * Adapt specs to new response type * Remove shared state between tests * Improve jQuery coverage * Handling body for xhr request * Merge remote-tracking branch 'origin/master' into chore/integration_tests * Merge pull request #113 from devlucky/relase-0.1.3 * basic jquery and superagent support * Integration specs structure relase-0.1.3 / 2016-06-08 ========================= * v0.1.3 v0.1.3 / 2016-06-08 =================== * v0.1.3 * Update Readme * Merge pull request #112 from devlucky/chore/keywords * Add keywords and fix table of contents * Merge pull request #110 from devlucky/example/dummy * Merge remote-tracking branch 'origin/master' into example/dummy * Update dummy readme * Ignore dist * Update Readme * Fix entry point for npm package * Bower dummy integration * Merge pull request #111 from devlucky/chore/bower * Add bower support * Dummy example draft * Merge pull request #106 from devlucky/add_demo_links_to_readmes add_demo_links_to_readmes / 2016-06-04 ====================================== * Update README * Add Demos links to Readme add / 2016-06-02 ================ * Merge pull request #105 from devlucky/chore/deploy_demo_apps * Deploy demo apps to Firebase * Merge pull request #91 from devlucky/feature/scenarios * fix tests * Check that scenarios works with xhr * Use helpers instead of 'this' * Introduce KakapoRequest * Merge remote-tracking branch 'origin/master' into feature/scenarios * Adapt specs to the new scenario api * Intercept requests in the right moment * Merge pull request #95 from devlucky/chore/readme-generation * Readme autogeneration * Merge pull request #94 from devlucky/baseInterceptor/separate-from-strategies * Refactor interceptors, so they are not THAT tighly coupled with helpers * Make xhrInterceptor a little cleaner, move utils to helpers * Remove not needed functions and move from other files * Add xhrInterceptor.spec to specs exports * Create spec for xhrInterceptor * Pass db to request handler * Merge pull request #90 from devlucky/chore/add_npm_version_badge * Remove disclaimer * Relaser setup * Merge pull request #88 from devlucky/chore/relaser_integration * 0.1.2 v0.1.2 / 2016-05-20 =================== * 0.1.2 * Fix current version * Merge remote-tracking branch 'origin/master' into chore/relaser_integration * Fix build_command * [Example] GitHub explorer (#83) * Merge pull request #89 from devlucky/oskarcieslik-patch-1 * Update README.md * Merge branch 'master' into chore/relaser_integration * Merge pull request #87 from devlucky/patch-1 * Relaser setup * Change entry point in package.json to lib/ * Merge pull request #84 from devlucky/bugfix/apply_xhr_instance_attributes * Merge branch 'master' into bugfix/apply_xhr_instance_attributes * Merge pull request #86 from devlucky/oskarcieslik-patch-1-1 * Update README.md * Merge pull request #79 from devlucky/example/todo-app * docs(Example/Todo-app): Example app * chore(package.json): new build script * chore(makefile): New build script * chore(project): no dist/ in project * feat(todo-app/kakapo-config): Add more generated data * feat(todo-app/kakapo-config): Add some faker generated data :zap: * Apply all xhr instance properties and methods * Merge remote-tracking branch 'origin/master' into example/todo-app * Render after destroy todos * Merge pull request #82 from devlucky/feature/delete_record * Implement record.delete() * Delete todo * Implement record.delete() * Toggle all * Update TODO's * Merge pull request #80 from devlucky/bugfix/fetch_interceptor_request_url * Handle record creation * Decorate record on push * Support Request url in fetch interceptor * Todo app first draft * Support Request url in fetch interceptor * Merge pull request #76 from devlucky/documentation/util * docs(helpers/util): Add documentation for helpers/util * Merge pull request #75 from devlucky/documentation/recordFactory * docs(database/recordFactory): Add documentation for recordFactory * Merge pull request #74 from devlucky/documentation/database * Merge branch 'master' into documentation/database * docs(database): Fix documentation a bit in style * Merge pull request #73 from devlucky/documentation/database * docs(database): Create documentation for Database * Merge pull request #72 from devlucky/database/refactor-stores * test(database): remove unused tests * refactor(database/uuidStore): create registration for uuidStore * fix(database/find): Fix serialize function call to have collectionName on it * style(styling): * style(database + recordFactory): styling] * test(database): Remove test for factoryFor * fix(database/hasMany): hasMany should be in range [1, len(all)] * refactor(database/factoryFor|serializerFor): Rename methods to better tell purpose * style(database/order): Order methods alphabetically * refactor(database/serializers): Separate concerns of serialize & other methods * refactor(database/serializers): Separate concerns of serialize & other methods * refactor(database/whole): More code removal, better practices implementation * refactor(database/uuidStore + database/whole): Move uuid to it's own store. Remove unnecessary metho * refactor(database/factoryStore|serializerStore): Move factories and serializers outside of Database * refactor(database/store): Move records' store outside of database, replace with weakmaps + maps * Merge pull request #71 from devlucky/test/runners--all-specs * chore(test/runners): By default let's have runners call ALL specs v0.0.1 / 2016-05-10 =================== * Merge pull request #70 from devlucky/project/style-fixes * style(serializers/json-api): fixes according to airbnb-javascript guide * style(serializers/index): fixes according to airbnb-javascript guide * style(router): fixes according to airbnb-javascript guide * style(interceptors/xhrInterceptor): fixes according to airbnb-javascript guide * style(interceptors/index): fixes according to airbnb-javascript guide * style(interceptors/fetchInterceptor): fixes according to airbnb-javascript guide * style(interceptors/baseInterceptor): fixes according to airbnb-javascript guide * style(helpers/util): fixes according to airbnb-javascript guide * style(database/recordFactory): fixes according to airbnb-javascript guide * fix(database): Fix missing return statement * fix(test/database): fix name change from previous style changes * style(database): fixes according to airbnb-javascript guide * style(database): fixes according to airbnb-javascript guide * Update README.md v0.0.0 / 2016-05-08 =================== * Merge pull request #67 from devlucky/database/first-last * test(Database/first+last): Add tests for Database.first and Database.last * refactor(database/first+last): Add check for presence of factory * fix(version): Update npm + github version of package * fix(semantic-release): Fix semrel * 0.0.0 * feat(Makefile & semantic-release): Move semantic-release to Makefile & remove npm publish for now * feat(Database): Database now have (find + findOne) instead of (find + filter) * chore(commitizen): Add run-config for commitizen * fix(package.json): Add missing coma * chore(semantic-release): Replaced relaser with semantic-release * chore(codecov.io): Add codecov again, somehow disappeared?! * Merge pull request #65 from devlucky/database/find * fix(Fix tests typos): * fix(specs/serializers): Fix new database methods * refactor(database/find): Change filter method to find * refactor(database/findOne): Change find method to findOne * chore(package.json): Add script for karma-watch * style(specs): Improve specs according to Airbnb's styleguide * style(runners/travis): Stop using lodash just for iterating specs * style(runners/karma): Improve karma runner * style(test/index.html): * style(runners/browser): Improve browser runner * chore(Makefile): Extract some parts of commands to VARIABLEs * chore(Makefile): Replace scripts with Makefile * chore(scripts): Remove scripts dir * chore(gitignore): Fix coverage dir again * chore(test_bundle): Remove test_bundle.js from git * chore(gitignore): Fix path to test dir * chore(test-coverage): Update reports dir * chore(eslint): Update deprecated config. Install config modules * chore(editorconfig): Add editor config to project * docs(LICENSE): Nicer LICENSE file * chore(project): Remove playground * chore(project/dist): Remove dist directory * chore(webpack): Add loaders to webpack & actually install their npm packages * fix(package.json): move some dependencies to dev deps * refactor(test): mv tests => test * fix(.gitignore): Fix path to test_bundle * chore(Add test_bundle to .gitignore): * chore(Add npm logs to .gitignore): * Merge branch 'master' of github.com:devlucky/Kakapo.js * chore(.gitignore): Extend gitignore * Merge pull request #60 from devlucky/interceptor/nativeServices * refactor(interceptors): Take use of those nativeServices helper. * Merge branch 'master' of github.com:devlucky/Kakapo.js * Project/refactor structure (#59) * refactor(project): Improve project's structure to follow modern node apps * refactor(project): Improve project's structure to follow modern node apps * Merge branch 'master' of github.com:devlucky/Kakapo.js * refactor(interceptors): Improve interceptors structure (#58) * refactor(interceptors): Improve interceptors structure * Merge pull request #57 from devlucky/database/refactor * refactor(specs): Change request delay to 1s for quicker tests * fix(package.json): Fix packages versions causing errors in travis-ci * fix(database/hasMany): Quick fix for limit of hasMany, this was making our tests fail at random * refactor(database/hasMany): * style(database/all): * refactor(database/hasMany): * refactor(database/belongsTo): * test(database/nested-find database/nested-filter): Test find / filter with nested conditions. * Merge pull request #48 from devlucky/feature/db_relationships * Merge remote-tracking branch 'origin/master' into feature/db_relationships * Rename last by lastItem * Merge pull request #55 from devlucky/database/nested-factories * Add tests for nested properties * ... * Add recursive factory mapping * Merge pull request #46 from devlucky/router/requestDelay * Merge branch 'master' into router/requestDelay * Fix mutability bug * Implement Database relationships * Merge pull request #41 from devlucky/feature/serializers * Serializer improvements * Separate router configs, add requestDelay option * Return undefined in factoryFor * Merge remote-tracking branch 'origin/master' into feature/serializers * Fix serializer * Update router.js * Merge pull request #45 from devlucky/router/additional-options * Change undefined to null. Tests using some valid url * Add functionality to specify host * Add functionality to specify host * Don't mutate default config * Update README.md * New slack team * Change ES6 Object's static methods to lodash alternatives * Merge pull request #38 from devlucky/database/pass-records-as-copy * Serializers draft * Better order of parameters * Records are now passed as copies * Merge pull request #36 from devlucky/database/safer-tests * Merge pull request #37 from devlucky/scripts/refactor * Fix package.json * Move scripts into separate files * Run code coverage only on travis * Add checks for factory presence to more functions, also tests * Make database tests safer * Implement record factory for database (#33) * Add slack notifications * Add codecov coverage * Merge pull request #32 from devlucky/response/fix-coverage * Tests for response.error and response.ok * Refactor error() * Merge pull request #31 from devlucky/tests/code-coverage * Add code-coverage with automatic codecove.io report * Separate tests into modules, also provide workflow just for travis * Abstract fakeXMLHttpRequest & fakeFetch functionality (#28) * Merge pull request #29 from devlucky/router/refactor-router * Remove request, change with register * Refactor router just a little * Implement database's record population (#21) * :tada: * Align code with new structure * Merge remote-tracking branch 'origin/master' into feature/rich_response_support * Add slack to travis * typo in scripts * Change script names a little, add support for multiple runs karma * Change package.json due to new structure * Separate tape-dom with karma, remove index.js * move index.html & fixtures to browser folder, better structure * move index.html & fixtures to browser folder, better structure * Make specs more modular, better structure * this is my last typo in .travis.yml * another typo in .travis.yml * typo in .travis.yml * Merge branch 'master' of github.com:devlucky/Kakapo.js * EHH... Updating firefox on travis... * Update README.md * Change karma launcher to firefox, since travis doesnt have chrome * Fix travis' yaml file * Support for Travis-CI with karma test-runner * Merge branch 'master' of github.com:devlucky/Kakapo.js * Change tests for travis * Add comments for tape-dom * Add some docs... * Add some docs... * Clean up tests for further travis-ci integration * Run npm scripts with npm-run-all to kill all scripts on ctrl-c * Support Request headers * Implement response headers support * Merge remote-tracking branch 'origin/master' into feature/rich_response_support * Merge pull request #17 from devlucky/feature/return_response_instances_in_fakeFetch * Use const for fakeResponse function * Response headers wip * Introduce Response concept * Make tests support Fetch Api * Return Response instances for fakeFetch * Clean fetch.js, Parse query * Some more ES6 goodness, Support for query * Support request query handling * Return request params in request handler * Return request body in handler * Intercept XHMLHttpRequest * Implement Interceptors concept * Improving Router coverage * Working on interceptor... * Remove wip * Change scripts to run concurrently since serve is watching * Change python server to npm serve * Script to run tests in one tab * Add missing dev-dependency * Update README.md * Improve coverage for DB * DB first draft * remove ghooks * Fix environment * 0.1.1 v0.1.1 / 2016-04-06 =================== * 0.1.1 * Initial commit ================================================ FILE: LICENSE ================================================ The MIT License (MIT) Copyright (c) 2016 @oskarcieslik - @zzarcon (https://github.com/devlucky) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================ # Kakapo.js [![Build Status](https://travis-ci.org/devlucky/Kakapo.js.svg?branch=master)](https://travis-ci.org/devlucky/Kakapo.js) [![codecov.io](https://codecov.io/github/devlucky/Kakapo.js/coverage.svg?branch=master)](https://codecov.io/github/devlucky/Kakapo.js?branch=master) [![npm version](https://badge.fury.io/js/kakapo.svg)](https://npmjs.com/package/kakapo) [![dependencies](https://david-dm.org/devlucky/Kakapo.js.svg)](https://david-dm.org/devlucky/Kakapo.js) [![npm license](https://img.shields.io/npm/l/awesome-badges.svg)](https://tldrlegal.com/license/mit-license) > Next generation mocking framework in Javascript - [docs](http://devlucky.github.io/kakapo-js) ## Contents - [Getting started](#getting-started) - [Installation](#installation) - [Examples](#examples) - [Basic](#basic) - [Using the DB](#using-the-db) - [Unchaining the Router](#unchaining-the-router) - [Fetch & XMLHttpRequest support](#fetch--xmlhttprequest-support) - [Database candyness](#database-candyness) - [Passthrough](#passthrough) - [Demo Apps](#demo-apps) - [TODO App](#todo-app) - [Github explorer](#github-explorer) - [Components](#components) - [Server](#server) - [Router](#router) - [Database](#database) - [Response](#response) - [Serializers](#serializers) - [Interceptors](#interceptors) - [Scenarios](#scenarios) - [Fake data](#fake-data) - [Browser support](#browser-support) - [Roadmap](#roadmap) Kakapo its a full featured http mocking library, he allows you to entirely replicate your backend logic in simple and declaritive way directly in the browser. This way you can easily prototype and develop the whole Application without backend and just deactivate Kakapo when you go production. In order to achieve that Kakapo gives you a set of utilities like Routing, Database, Response, Request and so on... ## Installation `$ npm i kakapo -D` `$ bower i kakapo -D` # Examples Before going deep into the Kakapo docs, we want to show you some examples of how to use Kakapo in your apps, in order to demonstrate how easy to integrate it is ## Basic Use the kakapo router to declare two custom routes and returning custom data. ```javascript import {Router, Server} from 'Kakapo'; const router = new Router(); router.get('/users', _ => { return [{ id: 1, name: 'Hector' }, { id: 2, name: 'Zarco' }] }); router.get('/users/:user_id', request => { const userId = request.params.user_id; return [{ id: userId, name: 'Hector' }]; }); const server = new Server(); server.use(router); fetch('/users', users => { console.log(users[0].id === 1); console.log(users[1].id === 2); }); fetch('/users/3', user => { console.log(user.id === 3); console.log(user.name === 'Hector'); }); ``` ### Using the DB Combine the usage of the Router and the Database to have a more consistent way of managing the mock data. In the following example we are defining the user factory and later using some access methods provided by the db. ```javascript import {Database, Router, Server} from 'Kakapo'; const db = new Database(); db.register('user', () => ({ firstName: 'Hector', lastName: 'Zarco' })); db.create('user', 10); const router = new Router(); router.get('/users', (request, db) => { return db.all('user'); }); router.get('/users/:user_id', (request, db) => { const userId = request.params.user_id; return db.findOne('user', userId); }); const server = new Server(); server.use(db); server.use(router); fetch('/users', users => { console.log(users[0].id === 1); console.log(users[1].id === 2); console.log(users[2].id === 3); }); fetch('/users/7', user => { console.log(user.id === 7); console.log(user.name === 'Hector'); }); ``` As you can see, the database automatically handles the **id** generation, so you don't have to worry about assigning incremental id's of any kind. ### Unchaining the Router Next you will see how to use other features of the router and figure out the things you can build with it. In this example we show you how easy is to create a fake pagination handling, which is based in the actual requested page. ```javascript import {Router, Server} from 'Kakapo'; const router = new Router(); router.get('/users', (request) => { const currentPage = request.query.page; let count = request.query.count; let users = [] while (--count) { users.push({name: 'hector', age: 24}); } return { data: users, metadata: { previous_page: currentPage - 1, current_page: currentPage, next_page: currentPage + 1 } } }); router.post('/users/:user_id/friends/:friend_id', (request) => { const token = request.headers.get('X-auth-token'); const userId = request.params.friend_id; const friendId = request.params.friend_id; let message; if (token === 'foo-bar') { message = `successs friend: ${friendId} created for userId: ${userId}`; } else { message = 'Unauthorized'; } return { message } }); const server = new Server(); server.use(router); fetch('/users?page=1&count=3', response => { console.log(response.data.length === 3); console.log(response.metadata.previous_page === 1); console.log(response.metadata.next_page === 2); }); const headers = new Headers(); headers.append('X-auth-token', 'foo-bar'); const request = new Request('/users/10/friends/55'); fetch(request, {method: 'POST', headers}).then(response => { console.log(response.message); }); ``` ### Fetch & XMLHttpRequest support Kakapo have Fetch and XMLHttpRequest support by default, but you can always change that if you want, see the [interceptors docs](#interceptors). ```javascript import {Router, Server} from 'Kakapo'; const router = new Router(); router.get('/users/', () => { return 'meh'; }); const server = new Server(); server.use(router); fetch('/users', users => { console.log(users[0].id === 1); console.log(users[1].id === 2); }); const xhr = new XMLHttpRequest(); xhr.onreadystatechange = () => { if (xhr.readyState !== 4) return; const response = JSON.parse(xhr.responseText); console.log(response[0].id === 1); console.log(response[1].id === 2); }; xhr.open('GET', '/users', true); xhr.send(); ``` ### Database candyness Check how easy to build a consistent CRUD Api with the kakapo db. ```javascript import {Database, Router, Server, Response as KakapoResponse} from 'Kakapo'; const sever = new Server(); const router = new Router(); const databse = new Database(); database.register('user', faker => { return { firstName: faker.name.firstName, lastName: faker.name.lastName, age: 24 }; }); database.create('user', 5); router.get('/users', (request, db) => { return db.all('user'); }); router.post('/users', (request, db) => { const user = JSON.parse(request.body); db.push('user', user); return user; }); router.put('/users/:user_id', (request, db) => { const newLastName = JSON.parse(request.body).lastName; const user = db.findOne('user', request.params.user_id); user.lastName = newLastName; user.save(); return user; }); router.delete('/users/:user_id', (request, db) => { const user = db.findOne('user', request.params.user_id); const code = user ? 200 : 400; const body = {code}; user && user.delete(); return new KakapoResponse(code, body); }); const server = new Server(); server.use(database); server.use(router); const getUsers = () => { return fetch('/users').then(r => r.json()); } const createUser = (user) => { return $.post('/users', user); }; const updateLast = () => { return $.ajax({ url: '/users/6', method: 'PUT', data: {lastName: 'Zarco'} }); }; const deleteFirst = () => { return $.ajax({ url: '/users/1', method: 'DELETE' }); }; getUsers() // users[0].id === 1, users.length === 5 .then(createUser.bind(null, {firstName: 'Hector'})) // response.id === 6, response.firstName === 'Hector' .then(deleteFirst) // response.code === 200 .then(getUsers) // users[0].id == 2, users[4].id == 6, users.length == 5 .then(updateLast) // user.id == 6, user.lastName == 'Zarco' .then(getUsers) // users.length == 5 ``` ### Passthrough You don't need to do anything in order to keep your existing request working as they were before. Kakapo will just passthrough all the request that doesn't match any of the defined routes and fire the associated callback. ```javascript import {Router, Server} from 'Kakapo'; const server = new Server(); const router = new Router(); router.get('/users', (request) => { return 'Kakapo'; }); const server = new Server(); server.use(router); fetch('/users', users => { users == 'Kakapo'; }); fetch('https://api.github.com/users', users => { //Real Github users data }); ``` # Demo Apps ## TODO App Every project needs a TODO App, so here is the Kakapo one. Straightforward vanilla js app, uses the **fetch api** for the networking part. [Check the demo](https://kakapo-todo-app.firebaseapp.com/) or [look at the code](https://github.com/devlucky/Kakapo.js/tree/master/examples/todo-app) ![](http://cl.ly/1K1z1G102X1P/Screen%20Recording%202016-05-16%20at%2010.06%20PM.gif) ## Github explorer Basic github users search example, based 100% on the (Github Api)[https://developer.github.com/v3]. It shows you how easy is to replicate the logic of a backend with Kakapo and iterate faster when building the UI. This example also uses jQuery just to demostrate the compatibility with Kakapo. [Check the demo](https://kakapo-github-explorer.firebaseapp.com) or [look at the code](https://github.com/devlucky/Kakapo.js/tree/master/examples/github-explorer) ![](https://raw.github.com/devlucky/Kakapo.js/master/examples/github-explorer/demo.gif) # Components ## Server The Kakapo Server is the main component of the framework, he is charge of activate things and link components like the router or the database. **Linking components** So, in order to make your router to start intercepting requests, you must connect him with your server using the *use* method. Also is a good practice to connect your *current database* with your server, that way you will receive her as a parameter in your request handlers. This practice is very useful when you have multiple databases and routers, since you can easily swicth them without rewriting anything, see [Scenarios](#scenarios) section ```javascript const myDB = new Database(); const router = new Router(); const server = new Server(); router.get('/posts', (request, db) => { console.log(db === myDB); }); server.use(myDB); server.use(router); fetch('/posts'); ``` ## Router The Router class gives you the functionality to it has a very intuitive interface, so if you ever had to build any kind of rest api in any server-side language, you are already familiar with the Kakapo router. that allows you to define complex routes (like in a real server) **Method handling** Those are the supported http methods ```javascript import {Router} from 'kakapo'; const router = new Router(); router.get('/users/:user_id') router.post('/users/:user_id') router.put('/users/:user_id') router.delete('/users/:user_id') ``` **Request object** You can access to all the request properties through the request object passed in the request handler ```javascript router.get('/posts/:post_id/comments/:comment_id', request => { console.log(request.params.post_id); console.log(request.params.comment_id); console.log(request.query.page); console.log(request.query.count); console.log(request.body); console.log(request.headers); }); $.ajax({ url: '/posts/1/comments/5?page=1&count=10', data: {text: 'Foo comment'}, headers: {'X-Access-token': '12345'} }) ``` **Options** Other useful router options are the **host** and the **requestDelay**, you just need to pass them at the initialization moment ```javascript import {Router} from 'kakapo'; const router = new Router({ host: 'https://api.github.com', requestDelay: 2000 }); ``` ## Database Database along with the Router is also one of the most important components, if you learn how to use it properly you can reuse tons of code and become really productive, that's why Kakapo promotes the use of the Database but you can still don't use it and return whatever you want from the request handlers. **Factories** They come with [Faker](https://github.com/Marak/faker.js) a cool library to generate fake data Just a brief example of what you can achieve with the db: ```javascript import {Server, Router, Database} from 'kakapo'; const router = new Router(); const database = new Database(); const server = new Server(); db.register('user', faker => { const name = faker.internet.userName(); return { name, avatar_url: faker.internet.avatar, url: `https://api.github.com/users/${name}`, type: "User", company: faker.company.companyName, blog: faker.internet.url, location: faker.address.city, email: faker.internet.email, bio: faker.hacker.phrase, created_at: faker.date.past, updated_at: faker.date.recent } }); db.create('user', 10); router.get('/users', (request, db) => { return db.all('user'); }); router.get('/users/:user_id', (request, db) => { return db.findOne('user', request.params.user_id); }); router.post('/users', (request, db) => { return db.push('user', request.params.body); }); server.use(database); server.use(router); ``` **Relationships** Sometimes while mocking, you miss some sort of consistency in your responses. Let's say you have a blog and when you ask for comments of a post you return a **post_id** that doesn't match any of the post ids... You can solve that using relationships, they are designed to help you create this consistent state across all your requests. The methods are **belongsTo** and **hasMany** ```javascript import {Server, Database, Router} from 'kakapo'; const server = new Server(); const db = new Database(); const router = new Router(); const blogFactory = () => ({ posts: db.hasMany('post'), authors: db.hasMany('user', 2) //Notice how we expecify the author id, to force to return that record always }); const postFactory = () => ({ title: 'Js for the lulz', body: 'html body', blog: db.belongsTo('blog') }); const userFactory = () => ({ name: 'devlucky', followers: 1000, }); db.register('blog', blogFactory); db.register('post', postFactory); db.register('user', userFactory); db.create('post', 10); db.create('user', 5); db.create('blog', 1); ``` ## Response The Response object is a helper class mostly used inside the request handlers to provide rich responses to your real handlers ```javascript import { Server, Response, Router } from 'kakapo'; const server = new Server(); const router = new Router(); router.get('/user/:user_id', request => { const code = request.params.user_id < 10 ? 200 : 400; const headers = {'X-request-date': new Date().getTime()}; return new Response(code, {status: code}, headers); }); server.use(router); ``` ## Serializers This is another component very familiar in backend laguages, Serializers offers you a way to abstract the **render** part of your entities. In this example we cover a common case in which you have different versions of your Api and you want to represent that in Kakapo in the same way ```javascript const ApiV2Serializer = (record, type) => { const id = record.id; const metadata = {created_at: new Date()}; const attributes = Object.assign({}, record, metadata); return { id, type, attributes }; }; const db = new Database(); db.register('user', () => ({ firstName: 'Hector', lastName: 'Zarco', age: 24, }), ApiV2Serializer); db.register('comment', () => ({ text: 'msg' }), ApiV2Serializer); ``` ## Interceptors This component is the one that actually handles the original request, is a private one but you can configure it in the Router. Just pass **strategies** in the constructor, by default both **fetch** and **XMLHttpRequest** are used. ```javascript import {Server, Router} from 'kakapo'; const server = new Server(); const fetchRouter = new Router({ strategies: ['fetch'] }); const xhrRouter = new Router({ strategies: ['XMLHttpRequest'] }); server.use(fetchRouter); //LATER server.use(xhrRouter); ``` ## Scenarios The **scenario** concept is nothing else than the ability of having different presets of Kakapo, like router, database, etc... and later, allow the user to decide when he wants to use one of other. Let's say you want to check how the spinners looks in your app, in that case you probably will put a higher value as a **requestDelay**, to make sure that the requests are intercepted late and you can check the UI... other good use case might be one in which you want to test the performance of a view when you have thousands of elements, in order to achieve that you will just need to pass a high number to the **create** method of the **Database**: ```javascript import {Server, Router, Database} from 'kakapo'; const userFactory = (faker) => { return { name: faker.name.findName, age: 24, city: 'Valencia' } }; const usersHandler = (request, db) => db.all('user'); const wifiServer = new Server({requestDelay: 150}); const threeGServer = new Server({requestDelay: 1000}); const router = new Router(); const chillDB = new Database(); const stressfulDB = new Database(); chillDB.register('user', userFactory); chillDB.create('user', 5); stressfulDB.register('user', userFactory); stressfulDB.create('user', 1000); wifiServer.get('/users', usersHandler); threeGServer.get('/users', usersHandler); //Pick the server with more latency if you want to check how the spinner looks like //server.use(wifiServer); server.use(threeGServer); //Here you just have to switch between different databases in order to test the UI with tons of users //server.use(chillDB); server.use(stressfulDB); ``` ## Fake data As mention above, you can use [Faker](https://github.com/Marak/faker.js) for generate fake data, take a look at the full demo [here](http://marak.com/faker.js/). Also note that you can define nested properties and use Faker on them: ```javascript db.register('user', faker => { return { user: { name: faker.name.findName, nick: 'nick' }, company: faker.company.companyName, location: 'Valencia, Spain' } }); ``` # ROADMAP **Full support for JSONApiSerializer** **Node.js compatibility** **Node.js interceptors** # Authors [@rpunkfu](https://github.com/rpunkfu) - [@zzarcon](https://github.com/zzarcon) ================================================ FILE: __tests__/data/users.ts ================================================ import * as Faker from 'faker'; export type UserId = string; export type User = { id: UserId, firstName: string, lastName: string, age: number }; export const userFactory = ({ id = Faker.random.uuid(), firstName = Faker.name.firstName(), lastName = Faker.name.lastName(), age = Faker.random.number() }: Partial = {} as User) => ({ id, firstName, lastName, age }); export const someUser = userFactory(); ================================================ FILE: __tests__/database_spec.ts ================================================ import * as Faker from 'faker'; import { Database, DataFactory } from '../src/Database'; import { User, UserId, userFactory, someUser } from './data/users'; describe('Database', () => { type Book = { userId: UserId; name: string; }; type Schema = { user: User; book: Book; }; type SetupOptions = { factory?: DataFactory; }; const firstName = Faker.name.firstName(); const lastName = Faker.name.lastName(); const setup = ({ factory = jest.fn(userFactory) }: SetupOptions = {}) => { const database: Database = new Database(); database.register('user', factory); return { database, factory }; }; describe('create', () => { it('should create a record given no size specified', () => { const { database } = setup({ factory: () => someUser }); const records = database.create('user'); expect(records).toHaveLength(1); const [record] = records; expect(record.id).toEqual(0); expect(record.data).toEqual(someUser); }); it('should create multiple records given size is over 1', () => { const { database } = setup(); const records = database.create('user', 10); expect(records).toHaveLength(10); }); it('should throw error given collection has not been registered', () => { const database: Database<{ user: User; }> = new Database(); expect(() => database.create('user')).toThrow(); }); }); describe('all', () => { it('should return all records given collection name', () => { const { database } = setup(); database.create('user', 10); expect(database.all('user')).toHaveLength(10); database.create('user', 5); expect(database.all('user')).toHaveLength(15); }); }); describe('delete', () => { it('should return a record given id of existing record', () => { const { database } = setup(); const user = userFactory({ firstName, lastName }); database.create('user', 10); const record = database.push('user', user); expect(database.all('user')).toHaveLength(11); expect(database.delete('user', record.id)).toEqual(record); expect(database.all('user')).toHaveLength(10); }); it('should return null given id of non-existing record', () => { const { database } = setup(); const user = userFactory({ firstName, lastName }); database.create('user', 10); expect(database.all('user')).toHaveLength(10); expect(database.delete('user', 123)).toBeNull(); expect(database.all('user')).toHaveLength(10); }); }); describe('find', () => { it('should return matching records given predicate', () => { const { database } = setup(); database.create('user', 10); database.create('user', 5, () => userFactory({ firstName })); expect(database.all('user')).toHaveLength(15); expect(database.find('user', { firstName })).toHaveLength(5); }); }); describe('findOne', () => { it('should return first matching record given predicate', () => { const { database } = setup(); const user = userFactory({ firstName, lastName }); database.create('user', 10); database.push('user', user); database.create('user', 5, () => userFactory({ firstName })); database.create('user', 10); expect(database.findOne('user', { firstName })!.data).toEqual(user); }); }); describe('first', () => { it('should return the first record given collection name', () => { const { database } = setup(); database.push('user', someUser); database.create('user', 10); expect(database.first('user')!.data).toEqual(someUser); }); }); describe('last', () => { it('should return the last record given collection name', () => { const { database } = setup(); database.create('user', 10); database.push('user', someUser); expect(database.last('user')!.data).toEqual(someUser); }); }); describe('push', () => { it('should return a record given some data', () => { const { database } = setup(); const record = database.push('user', someUser); expect(record.data).toEqual(someUser); }); }); describe('register', () => { it('should allow database to create records of given collection name', () => { const { database } = setup(); database.register('book', () => ({ id: Faker.random.uuid(), name: Faker.hacker.phrase(), userId: someUser.id })); const records = database.create('book', 10); expect(records).toHaveLength(10); }); it('should now allow database to create records of given collection has not been registered', () => { const { database } = setup(); expect(() => database.create('book')).toThrow(); }); }); describe('reset', () => { it('should remove all collections', () => { const { database } = setup(); expect(database.exists('user')).toBeTruthy(); expect(database.exists('book')).toBeFalsy(); database.register('book', () => ({ id: Faker.random.uuid(), name: Faker.hacker.phrase(), userId: someUser.id })); expect(database.exists('user')).toBeTruthy(); expect(database.exists('book')).toBeTruthy(); database.reset(); expect(database.exists('user')).toBeFalsy(); expect(database.exists('book')).toBeFalsy(); }); }); describe('update', () => { it('should return an updated record given id of existing record', () => { const { database } = setup(); const [record] = database.create('user'); const updatedRecord = database.update('user', record.id, { firstName: 'Jimmy' }); expect(updatedRecord.id).toEqual(record.id); expect(updatedRecord.data).toEqual({ ...record.data, firstName: 'Jimmy' }); }); it('should throw an error given id of non-existing record', () => { const { database } = setup(); database.create('user', 10); expect(() => database.update('user', 123, { firstName: 'Jimmy' }) ).toThrow(); }); }); }); ================================================ FILE: __tests__/request_spec.ts ================================================ import { Server, Router } from '../src'; test.skip('Request # headers', () => { expect.assertions(2); const server = new Server(); const router = new Router(); router.post('/users', (request) => { expect(request.headers.get('custom-request-header-1')).toEqual('one'); expect(request.headers.get('custom-request-header-2')).toEqual('two'); }); server.use(router); // TODO: Headers is undefined in jsdom const headers = new Headers({ 'custom-request-header-1': 'one', 'custom-request-header-2': 'two', }); const options = { method: 'POST', headers, }; fetch('/users', options); }); // @TODO: Test explicitly the contents of request.params // @TODO: Test explicitly the contents of request.query ================================================ FILE: __tests__/response_spec.ts ================================================ import { Server, KakapoResponse, Router } from '../src'; // TODO: stub native Response describe.skip('Response', () => { test('Response # body', () => { expect.assertions(2); const server = new Server(); const router = new Router(); router.get( '/users/:id', request => new KakapoResponse(200, { id: request.params.id, type: 'user' }) ); server.use(router); fetch('/users/1') .then(r => r.json()) .then(result => { expect(result.id).toEqual('1'); expect(result.type).toEqual('user'); }); }); test('Response # headers', assert => { expect.assertions(4); const server = new Server(); const router = new Router(); router.get( '/users/:id', () => new KakapoResponse( 200, {}, { 'x-header-1': 'one', 'x-header-2': 'two' } ) ); server.use(router); fetch('/users/1').then(result => { expect(result.headers.get('x-header-1')).toEqual('one'); expect(result.headers.get('x-header-2')).toEqual('two'); }); const xhr = new XMLHttpRequest(); xhr.onreadystatechange = function() { if (xhr.readyState === 4) { expect(this.getResponseHeader('x-header-1')).toEqual('one'); expect(this.getResponseHeader('x-header-2')).toEqual('two'); } }; xhr.open('GET', '/users/1', true); xhr.send(); }); test('Response # error', assert => { const response = new KakapoResponse(404, {}, { 'x-header-1': 'one' }); expect(response.error).toBeTruthy(); }); test('Response # ok', assert => { const response = new KakapoResponse(204, {}, { 'x-header-1': 'one' }); expect(response.ok).toBeTruthy(); }); test('Response # code', assert => { expect.assertions(2); const server = new Server(); const router = new Router(); const responsePayload = { status: 'error' }; router.get('/users', request => new KakapoResponse(400, responsePayload)); server.use(router); const xhr = new XMLHttpRequest(); xhr.onreadystatechange = function() { if (xhr.readyState === 4) { expect(xhr.status).toEqual(400); expect(xhr.responseText).toEqual(JSON.stringify(responsePayload)); } }; xhr.open('GET', '/users', true); xhr.send(); }); }); ================================================ FILE: __tests__/router_spec.ts ================================================ import { Server, Router, KakapoResponse } from '../src'; import { isFakeFetch } from '../src/interceptors/fetchInterceptor'; describe('Router', () => { let server: Server; let router: Router; beforeEach(() => { server = new Server(); router = new Router(); }); afterEach(() => { router.reset(); }); it('should use fake fetch', () => { router = new Router({ host: 'https://api.github.com' }); router.get('/comments', request => { expect(typeof request).toEqual('object'); }); server.use(router); expect(isFakeFetch(fetch)).toBe(true); }); test('Router # config # host', async () => { // TODO: Create multiple servers at the same time with different // 'host' and check that works properly router = new Router({ host: 'https://api.github.com' }); router.get('/comments', request => { expect(typeof request).toEqual('object'); }); server.use(router); const response = await fetch('https://api.github.com/comments'); expect(response).toBeInstanceOf(Response); expect(response.ok).toBeTruthy(); const response2 = await fetch('/comments'); expect(response).toBeInstanceOf(Response); }); test('Router # config # requestDelay', async () => { router = new Router({ requestDelay: 1000 }); router.get('/comments', request => { expect(typeof request).toEqual('object'); }); server.use(router); const response = await fetch('/comments'); expect(response instanceof Response).toBeTruthy(); expect(response.ok).toBeTruthy(); }); test('Router # config # strategies', async () => { const server = new Server(); const router = new Router({}, {strategies: ['fetch']}); server.use(router); expect(router.routerConfig).toEqual({ strategies: ['fetch'] }) }); test('Router#get', async () => { router.get('/comments', request => { expect(typeof request).toEqual('object'); }); router.get('/users/:user_id', request => { expect(typeof request).toEqual('object'); expect(typeof request.params).toEqual('object'); return { users: [{ firstName: 'hector' }] }; }); server.use(router); expect(await fetch('/doesnt_exist')).toBeInstanceOf(Response); expect(await fetch('/comments')).toBeInstanceOf(Response); return fetch('/users/1') .then(response => { expect(response).toBeInstanceOf(Response); return response.json(); }) .then(response => { const firstName = response.users[0].firstName; expect(firstName).toEqual('hector'); }); }); test('Router#post', async () => { const body = JSON.stringify({ firstName: 'Joan', lastName: 'Romano' }); router.post('/users', request => { const parsedBody = JSON.parse(request.body); const firstName = parsedBody.firstName; expect(request.body).toEqual(body); expect(firstName).toEqual('Joan'); return { status: 'success', record: parsedBody }; }); server.use(router); const response = await (await fetch('/users', { method: 'POST', body })).json(); const status = response.status; const firstName = response.record.firstName; expect(status).toEqual('success'); expect(firstName).toEqual('Joan'); }); test('Router # post # XMLHttpRequest', () => { const body = JSON.stringify({ firstName: 'Joan', lastName: 'Romano' }); router.post('/hector', request => { const body = JSON.parse(request.body); expect(body.firstName).toEqual('Joan'); }); server.use(router); const xhr = new XMLHttpRequest(); xhr.onreadystatechange = () => {}; xhr.open('POST', '/hector', true); xhr.send(body); }); test('Router#put', async () => { router.put('/users', request => { const query = request.query; const page = query.page; expect(page).toEqual('1'); return { status: 'success', query }; }); server.use(router); const response = await (await fetch('/users?page=1', { method: 'PUT' })).json(); const status = response.status; const page = response.query.page; expect(status).toEqual('success'); expect(page).toEqual('1'); }); test('Router#delete', async () => { router.delete('/users/:user_id/comments/:comment_id', request => { const params = request.params; const commentId = request.params.comment_id; expect(commentId).toEqual('2'); return { status: 'success', params }; }); server.use(router); const response = await (await fetch('/users/1/comments/2', { method: 'DELETE' })).json(); const status = response.status; const userId = response.params.user_id; expect(status).toEqual('success'); expect(userId).toEqual('1'); }); test('Router#XMLHttpRequest # config # requestDelay', () => { router = new Router({ requestDelay: 10 }); router.get('/comments', request => { expect(typeof request).toEqual('object'); }); server.use(router); const xhr = new XMLHttpRequest(); xhr.onreadystatechange = () => {}; xhr.open('GET', '/comments', true); xhr.send(); }); test.skip('Router#XMLHttpRequest', () => { router.get('/comments', request => { const params = request.params; expect(typeof request).toEqual('object'); expect(typeof params).toEqual('object'); return [{ text: 'First comment' }, { text: 'Second comment' }]; }); server.use(router); const xhr = new XMLHttpRequest(); const xhr2 = new XMLHttpRequest(); xhr.onreadystatechange = () => { if (xhr.readyState !== 4) { return; } const response = xhr.responseText; expect(typeof response).toEqual('string'); }; xhr.open('GET', '/doesnt_exist', true); xhr.send(); xhr2.onreadystatechange = function() { if (xhr2.readyState !== 4 || xhr2.status !== 200) { return; } const response = xhr2.responseText; const texts = response; const responseObject = JSON.parse(response); expect(this.readyState).toEqual(xhr2.readyState); expect(this.responseText).toEqual(xhr2.responseText); expect(typeof response).toEqual('string'); expect(typeof responseObject).toEqual('object'); expect(responseObject.length).toEqual(2); }; xhr2.open('GET', '/comments', true); xhr2.send(); expect.assertions(8); }); test('Router # Async support', async () => { router.get('/async_endpoint', request => { return new Promise(resolve => { setTimeout(() => { resolve({ body: 'async response' }); }, 1000); }); }); server.use(router); const response = await (await fetch('/async_endpoint')).json(); expect(response.body).toEqual('async response'); }); test('Router # Fetch # Content-Type image/svg+xml', async () => { const svgData = 'svgData'; router.get('/svg_content', request => { return new KakapoResponse(200, svgData, { 'content-type': 'image/svg+xml' }); }); server.use(router); const response = await fetch('/svg_content'); expect(response.body).toEqual(svgData); }); test('Router # Fetch # No Content Type', async () => { const expectedResponse = { foo: 'bar' }; router.get('/json_content', request => { return new KakapoResponse(200, expectedResponse); }); server.use(router); const response = await fetch('/json_content'); expect(response.json()).resolves.toEqual(expectedResponse); }); test('Router # Fetch # Content Type application/json', async () => { const expectedResponse = { foo: 'bar' }; router.get('/json_content', request => { return new KakapoResponse(200, expectedResponse, { 'content-type': 'application/json' }); }); server.use(router); const response = await fetch('/json_content'); expect(response.body).toEqual(JSON.stringify(expectedResponse)); }); // @TODO Test strategies in router. }); ================================================ FILE: __tests__/server_spec.ts ================================================ // @TODO Test Server's config import { Database, Router, Server } from '../src'; const xhrRequest = (url: string) => { const xhr = new XMLHttpRequest(); xhr.onreadystatechange = () => {}; xhr.open('GET', url, true); xhr.send(); }; describe.skip('Server', () => { test('Server # use database', () => { expect.assertions(2); const myDB = new Database(); const router = new Router(); const server = new Server(); router.get('/fetch', (request, db) => { expect(db == myDB).toBeTruthy(); }); router.get('/xhr', (request, db) => { expect(db == myDB).toBeTruthy(); }); server.use(myDB); server.use(router); fetch('/fetch'); xhrRequest('/xhr'); }); test('Server # use router', () => { const router = new Router(); const server = new Server(); router.get('/comments', _ => { //Should not reach this handler since the request is fired before "server.use" }); router.get('/users', _ => { //It must only enter in this handler since the request has been triggered after the registration expect(true).toBeTruthy(); }); fetch('/comments'); server.use(router); fetch('/users'); }); test('Server # remove database', () => { expect.assertions(2); const myDB = new Database(); const router = new Router(); const server = new Server(); router.get('/fetch_db', (_request, db) => { expect(db == myDB).toBeTruthy(); }); router.get('/fetch_nodb', (_request, db) => { expect(db == null).toBeTruthy(); }); server.use(myDB); server.use(router); fetch('/fetch_db'); server.remove(myDB); fetch('/fetch_nodb'); }); test('Server # remove router', () => { expect.assertions(2); const router = new Router(); const server = new Server(); router.get('/fetch', _ => { //Server is active before being removed expect(true).toBeTruthy(); }); router.get('/fetch_fail', _ => { //Request is being intercepted when router is removed }); server.use(router); fetch('/fetch'); server.remove(router); fetch('/fetch_fail').then(response => { //Server is inactive after removal expect(response.status).toEqual(404); }); }); }); ================================================ FILE: create-readme.js ================================================ 'use strict'; const fs = require('fs'); const request = require('superagent'); const readmeUrl = 'https://cdn.rawgit.com/devlucky/devlucky.github.io/master/kakapo-js.md'; request .get(readmeUrl) .end(function(err, res) { if (err) { return console.log(err); } const text = res.text; const content = text.split('# Getting started')[1].replace(/\<\/div>/g, ''); const start = getFile('start'); const end = getFile('end'); const readme = [start, content, end].join(''); fs.writeFileSync('./README.md', readme); }); const getFile = uri => fs.readFileSync(`./md/${uri}.md`).toString(); ================================================ FILE: examples/dummy/.gitignore ================================================ bower_components dist ================================================ FILE: examples/dummy/README.md ================================================ #Kakapo Dummy App example > Just shows how to integrate Kakapo.js in you app in multiple flavours This Example shows different ways of requiring Kakapo.js in your app: ##ES6 Module `$ npm i kakapo -D` `$ npm run browserify` ```javascript import {Server, Router} from 'kakapo'; const server = new Server(); const router = new Router(); ``` ##AMD `$ npm i kakapo -D` `$ npm run browserify_require` ```javascript const kakapo = require('kakapo'); const server = new kakapo.Server(); const router = new kakapo.Router(); ``` ##Bower `$ bower i kakapo -D` Include **bower_components/kakapo/lib/kakapo.js** ```javascript const server = new Kakapo.Server(); const router = new Kakapo.Router(); ``` ================================================ FILE: examples/dummy/bower.json ================================================ { "name": "kakapo-dummy-app", "description": "Dummy app that shows how to integrate Kakapo.js", "main": "index.js", "authors": [ "kakapo-team" ], "license": "MIT", "homepage": "https://github.com/devlucky/Kakapo.js", "private": true, "dependencies": { "kakapo": "https://github.com/devlucky/Kakapo.js.git#master" } } ================================================ FILE: examples/dummy/index.html ================================================ Kakapo dummy app ================================================ FILE: examples/dummy/package.json ================================================ { "name": "kakapo-dummy-app", "version": "0.1.0", "description": "Dummy app that shows how to integrate Kakapo.js", "main": "index.js", "scripts": { "browserify": "browserify browserify_test.js -o dist/browserify_bundle.js -t [ babelify --presets [ es2015 ] ]", "browserify_require": "browserify browserify_require_test.js -o dist/browserify_require_bundle.js -t [ babelify --presets [ es2015 ] ]" }, "author": "kakapo-team", "license": "MIT", "dependencies": { "kakapo": "0.1.3" }, "devDependencies": { "babel-cli": "^6.10.1", "babel-preset-es2015": "^6.9.0", "babelify": "^7.3.0", "browserify": "^13.0.1" } } ================================================ FILE: examples/github-explorer/.firebaserc ================================================ { "projects": { "default": "kakapo-github-explorer" } } ================================================ FILE: examples/github-explorer/README.md ================================================ # Example - Github explorer > Example of a github user explorer powered by Kakapo.js - [DEMO](https://kakapo-github-explorer.firebaseapp.com/) ![](https://raw.github.com/devlucky/Kakapo.js/master/examples/github-explorer/demo.gif) # Installation `$ npm i` `$ python -m SimpleHTTPServer 8000` ================================================ FILE: examples/github-explorer/database.rules.json ================================================ { ".read": true, ".write": true } ================================================ FILE: examples/github-explorer/firebase.json ================================================ { "database": { "rules": "database.rules.json" }, "hosting": { "public": ".", "rewrites": [ { "source": "**", "destination": "/index.html" } ] } } ================================================ FILE: examples/github-explorer/index.html ================================================ Kakapo - Github explorer
================================================ FILE: examples/github-explorer/package.json ================================================ { "name": "kakapo-github-explorer", "version": "0.1.0", "description": "", "main": "index.js", "scripts": { "styles": "node-sass styles.scss styles.css -w" }, "author": "kakapo-team", "license": "MIT", "dependencies": { "jquery": "^2.2.3", "materialize-css": "^0.97.6" }, "devDependencies": { "node-sass": "^3.7.0" } } ================================================ FILE: examples/github-explorer/styles.css ================================================ nav { padding: 0 10px; margin-bottom: 20px; } nav #nav-mobile label { color: #ccc; } nav #nav-mobile label.active { display: none; } #search { padding: 0; margin-left: 35px; } .collection-item { transition: background-color 0.2s ease; cursor: pointer; } .collection-item:hover { background-color: #2bbbad; } #users-loader { height: 0; transition: height .3s; } #users-loader.active { height: 4px; } .media { display: flex; align-items: flex-start; margin-bottom: 10px; } .media .media-img { margin-right: 10px; width: 70px; } .media .media-body { flex: 1; } .media .media-title { margin-bottom: 5px; } .media ul li { display: flex; align-items: center; margin-bottom: 10px; } .media ul li i { margin-right: 10px; } .media p { border-top: 1px solid #eee; margin-top: 10px; padding-top: 10px; } ================================================ FILE: examples/github-explorer/styles.scss ================================================ nav { padding: 0 10px; margin-bottom: 20px; #nav-mobile label { color: #ccc; &.active { display: none; } } } #search { padding: 0; margin-left: 35px; } .collection-item { transition: background-color 0.2s ease; cursor: pointer; &:hover { background-color: #2bbbad; } } #users-loader { height: 0; transition: height .3s; &.active { height: 4px; } } .media{ display: flex; align-items: flex-start; margin-bottom: 10px; .media-img{ margin-right: 10px; width: 70px; } .media-body{ flex: 1; } .media-title{ margin-bottom: 5px; } ul{ li{ display: flex; align-items: center; margin-bottom: 10px; i{ margin-right: 10px; } } } p{ border-top: 1px solid #eee; margin-top: 10px; padding-top: 10px; } } ================================================ FILE: examples/react/.nvmrc ================================================ 8.5.0 ================================================ FILE: examples/react/example/app.tsx ================================================ import * as React from 'react'; import {Component} from 'react'; import {Server, Router} from '../../../dist'; import {AppWrapper} from './styled'; const server = new Server(); const router = new Router(); router.get('/files', () => { return { files: [1,2] }; }); router.get('/promise/files', () => { return Promise.resolve({ files: [1,2] }); }); router.post('/promise/file', async () => { await new Promise(resolve => setTimeout(resolve, 100)); return new Promise(resolve => { resolve({ status: 'success' }); }); }); server.use(router); export interface AppState { } export default class App extends Component <{}, AppState> { state: AppState = { } componentDidMount() { this.getFilesXHR(); this.getFilesPromiseXHR(); this.postFilePromiseXHR(); } async getFilesFetch() { const files = await (await fetch('/files')).json(); console.log(files) } async getFilesXHR() { const xhr = new XMLHttpRequest(); xhr.open('GET', '/files'); xhr.onload = () => { console.log('response', xhr.response); }; xhr.send(); } getFilesPromiseXHR() { const xhr = new XMLHttpRequest(); xhr.open('GET', '/promise/files'); xhr.onload = () => { console.log('promise response', xhr.response); }; xhr.send(); } postFilePromiseXHR() { const xhr = new XMLHttpRequest(); xhr.open('POST', '/promise/file'); xhr.onload = () => { console.log('promise post response', xhr.response); }; xhr.send(); } render() { return ( Example! ) } } ================================================ FILE: examples/react/example/index.html ================================================ Example
================================================ FILE: examples/react/example/index.tsx ================================================ import * as React from 'react'; import * as ReactDOM from 'react-dom'; import App from './app'; ReactDOM.render(, document.getElementById('app')); ================================================ FILE: examples/react/example/styled.ts ================================================ import styled from 'styled-components'; export const AppWrapper = styled.div` `; ================================================ FILE: examples/react/package.json ================================================ { "name": "kakapo-react-example", "version": "1.0.0", "private": true, "license": "MIT", "devDependencies": { "ts-react-toolbox": "^0.1.1" }, "engines": { "node": ">=8.5.0" }, "scripts": { "bootstrap": "ts-react-toolbox init", "dev": "ts-react-toolbox dev", "build": "ts-react-toolbox build", "lint": "ts-react-toolbox lint" }, "peerDependencies": { "react": "^16.2.0" } } ================================================ FILE: examples/react/tsconfig.json ================================================ { "compilerOptions": { "strict": true, "strictNullChecks": true, "strictFunctionTypes": true, "noImplicitThis": true, "alwaysStrict": true, "noUnusedLocals": true, "noUnusedParameters": true, "noImplicitReturns": true, "noFallthroughCasesInSwitch": true, "noImplicitAny": false, "removeComments": true, "target": "es5", "lib": [ "dom", "es5", "scripthost", "es2015.collection", "es2015.symbol", "es2015.iterable", "es2015.promise" ], "jsx": "react" } } ================================================ FILE: examples/todo-app/.firebaserc ================================================ { "projects": { "default": "kakapo-todo-app" } } ================================================ FILE: examples/todo-app/README.md ================================================ # Example - TODO App > Example of a todo app powered by Kakapo.js - [DEMO](https://kakapo-todo-app.firebaseapp.com/) ![](http://cl.ly/1K1z1G102X1P/Screen%20Recording%202016-05-16%20at%2010.06%20PM.gif) # Installation `$ npm i` `$ python -m SimpleHTTPServer 8000` ================================================ FILE: examples/todo-app/database.rules.json ================================================ { ".read": true, ".write": true } ================================================ FILE: examples/todo-app/firebase.json ================================================ { "database": { "rules": "database.rules.json" }, "hosting": { "public": ".", "rewrites": [ { "source": "**", "destination": "/index.html" } ] } } ================================================ FILE: examples/todo-app/index.html ================================================ Kakapo.js - TODO App

todos

    0 item left

    Double-click to edit a todo

    ================================================ FILE: examples/todo-app/package.json ================================================ { "name": "kakapo-todo-app", "version": "0.1.0", "description": "Todo app built with Kakapo.js", "main": "index.js", "scripts": {}, "author": "devlucky", "license": "MIT", "dependencies": { "kakapo": "0.0.1", "todomvc-app-css": "^2.0.5" } } ================================================ FILE: flow-typed/npm/jest_v22.x.x.js ================================================ // flow-typed signature: 069387a9f0aaed26ad0eb69da26f3e03 // flow-typed version: 2c21d4538f/jest_v22.x.x/flow_>=v0.39.x type JestMockFn, TReturn> = { (...args: TArguments): TReturn, /** * An object for introspecting mock calls */ mock: { /** * An array that represents all calls that have been made into this mock * function. Each call is represented by an array of arguments that were * passed during the call. */ calls: Array, /** * An array that contains all the object instances that have been * instantiated from this mock function. */ instances: Array }, /** * Resets all information stored in the mockFn.mock.calls and * mockFn.mock.instances arrays. Often this is useful when you want to clean * up a mock's usage data between two assertions. */ mockClear(): void, /** * Resets all information stored in the mock. This is useful when you want to * completely restore a mock back to its initial state. */ mockReset(): void, /** * Removes the mock and restores the initial implementation. This is useful * when you want to mock functions in certain test cases and restore the * original implementation in others. Beware that mockFn.mockRestore only * works when mock was created with jest.spyOn. Thus you have to take care of * restoration yourself when manually assigning jest.fn(). */ mockRestore(): void, /** * Accepts a function that should be used as the implementation of the mock. * The mock itself will still record all calls that go into and instances * that come from itself -- the only difference is that the implementation * will also be executed when the mock is called. */ mockImplementation( fn: (...args: TArguments) => TReturn ): JestMockFn, /** * Accepts a function that will be used as an implementation of the mock for * one call to the mocked function. Can be chained so that multiple function * calls produce different results. */ mockImplementationOnce( fn: (...args: TArguments) => TReturn ): JestMockFn, /** * Accepts a string to use in test result output in place of "jest.fn()" to * indicate which mock function is being referenced. */ mockName(name: string): JestMockFn, /** * Just a simple sugar function for returning `this` */ mockReturnThis(): void, /** * Deprecated: use jest.fn(() => value) instead */ mockReturnValue(value: TReturn): JestMockFn, /** * Sugar for only returning a value once inside your mock */ mockReturnValueOnce(value: TReturn): JestMockFn }; type JestAsymmetricEqualityType = { /** * A custom Jasmine equality tester */ asymmetricMatch(value: mixed): boolean }; type JestCallsType = { allArgs(): mixed, all(): mixed, any(): boolean, count(): number, first(): mixed, mostRecent(): mixed, reset(): void }; type JestClockType = { install(): void, mockDate(date: Date): void, tick(milliseconds?: number): void, uninstall(): void }; type JestMatcherResult = { message?: string | (() => string), pass: boolean }; type JestMatcher = (actual: any, expected: any) => JestMatcherResult; type JestPromiseType = { /** * Use rejects to unwrap the reason of a rejected promise so any other * matcher can be chained. If the promise is fulfilled the assertion fails. */ rejects: JestExpectType, /** * Use resolves to unwrap the value of a fulfilled promise so any other * matcher can be chained. If the promise is rejected the assertion fails. */ resolves: JestExpectType }; /** * Jest allows functions and classes to be used as test names in test() and * describe() */ type JestTestName = string | Function; /** * Plugin: jest-enzyme */ type EnzymeMatchersType = { toBeChecked(): void, toBeDisabled(): void, toBeEmpty(): void, toBeEmptyRender(): void, toBePresent(): void, toContainReact(element: React$Element): void, toExist(): void, toHaveClassName(className: string): void, toHaveHTML(html: string): void, toHaveProp: ((propKey: string, propValue?: any) => void) & ((props: Object) => void), toHaveRef(refName: string): void, toHaveState: ((stateKey: string, stateValue?: any) => void) & ((state: Object) => void), toHaveStyle: ((styleKey: string, styleValue?: any) => void) & ((style: Object) => void), toHaveTagName(tagName: string): void, toHaveText(text: string): void, toIncludeText(text: string): void, toHaveValue(value: any): void, toMatchElement(element: React$Element): void, toMatchSelector(selector: string): void }; // DOM testing library extensions https://github.com/kentcdodds/dom-testing-library#custom-jest-matchers type DomTestingLibraryType = { toBeInTheDOM(): void, toHaveTextContent(content: string): void, toHaveAttribute(name: string, expectedValue?: string): void }; type JestExpectType = { not: JestExpectType & EnzymeMatchersType & DomTestingLibraryType, /** * If you have a mock function, you can use .lastCalledWith to test what * arguments it was last called with. */ lastCalledWith(...args: Array): void, /** * toBe just checks that a value is what you expect. It uses === to check * strict equality. */ toBe(value: any): void, /** * Use .toHaveBeenCalled to ensure that a mock function got called. */ toBeCalled(): void, /** * Use .toBeCalledWith to ensure that a mock function was called with * specific arguments. */ toBeCalledWith(...args: Array): void, /** * Using exact equality with floating point numbers is a bad idea. Rounding * means that intuitive things fail. */ toBeCloseTo(num: number, delta: any): void, /** * Use .toBeDefined to check that a variable is not undefined. */ toBeDefined(): void, /** * Use .toBeFalsy when you don't care what a value is, you just want to * ensure a value is false in a boolean context. */ toBeFalsy(): void, /** * To compare floating point numbers, you can use toBeGreaterThan. */ toBeGreaterThan(number: number): void, /** * To compare floating point numbers, you can use toBeGreaterThanOrEqual. */ toBeGreaterThanOrEqual(number: number): void, /** * To compare floating point numbers, you can use toBeLessThan. */ toBeLessThan(number: number): void, /** * To compare floating point numbers, you can use toBeLessThanOrEqual. */ toBeLessThanOrEqual(number: number): void, /** * Use .toBeInstanceOf(Class) to check that an object is an instance of a * class. */ toBeInstanceOf(cls: Class<*>): void, /** * .toBeNull() is the same as .toBe(null) but the error messages are a bit * nicer. */ toBeNull(): void, /** * Use .toBeTruthy when you don't care what a value is, you just want to * ensure a value is true in a boolean context. */ toBeTruthy(): void, /** * Use .toBeUndefined to check that a variable is undefined. */ toBeUndefined(): void, /** * Use .toContain when you want to check that an item is in a list. For * testing the items in the list, this uses ===, a strict equality check. */ toContain(item: any): void, /** * Use .toContainEqual when you want to check that an item is in a list. For * testing the items in the list, this matcher recursively checks the * equality of all fields, rather than checking for object identity. */ toContainEqual(item: any): void, /** * Use .toEqual when you want to check that two objects have the same value. * This matcher recursively checks the equality of all fields, rather than * checking for object identity. */ toEqual(value: any): void, /** * Use .toHaveBeenCalled to ensure that a mock function got called. */ toHaveBeenCalled(): void, /** * Use .toHaveBeenCalledTimes to ensure that a mock function got called exact * number of times. */ toHaveBeenCalledTimes(number: number): void, /** * Use .toHaveBeenCalledWith to ensure that a mock function was called with * specific arguments. */ toHaveBeenCalledWith(...args: Array): void, /** * Use .toHaveBeenLastCalledWith to ensure that a mock function was last called * with specific arguments. */ toHaveBeenLastCalledWith(...args: Array): void, /** * Check that an object has a .length property and it is set to a certain * numeric value. */ toHaveLength(number: number): void, /** * */ toHaveProperty(propPath: string, value?: any): void, /** * Use .toMatch to check that a string matches a regular expression or string. */ toMatch(regexpOrString: RegExp | string): void, /** * Use .toMatchObject to check that a javascript object matches a subset of the properties of an object. */ toMatchObject(object: Object | Array): void, /** * This ensures that a React component matches the most recent snapshot. */ toMatchSnapshot(name?: string): void, /** * Use .toThrow to test that a function throws when it is called. * If you want to test that a specific error gets thrown, you can provide an * argument to toThrow. The argument can be a string for the error message, * a class for the error, or a regex that should match the error. * * Alias: .toThrowError */ toThrow(message?: string | Error | Class | RegExp): void, toThrowError(message?: string | Error | Class | RegExp): void, /** * Use .toThrowErrorMatchingSnapshot to test that a function throws a error * matching the most recent snapshot when it is called. */ toThrowErrorMatchingSnapshot(): void }; type JestObjectType = { /** * Disables automatic mocking in the module loader. * * After this method is called, all `require()`s will return the real * versions of each module (rather than a mocked version). */ disableAutomock(): JestObjectType, /** * An un-hoisted version of disableAutomock */ autoMockOff(): JestObjectType, /** * Enables automatic mocking in the module loader. */ enableAutomock(): JestObjectType, /** * An un-hoisted version of enableAutomock */ autoMockOn(): JestObjectType, /** * Clears the mock.calls and mock.instances properties of all mocks. * Equivalent to calling .mockClear() on every mocked function. */ clearAllMocks(): JestObjectType, /** * Resets the state of all mocks. Equivalent to calling .mockReset() on every * mocked function. */ resetAllMocks(): JestObjectType, /** * Restores all mocks back to their original value. */ restoreAllMocks(): JestObjectType, /** * Removes any pending timers from the timer system. */ clearAllTimers(): void, /** * The same as `mock` but not moved to the top of the expectation by * babel-jest. */ doMock(moduleName: string, moduleFactory?: any): JestObjectType, /** * The same as `unmock` but not moved to the top of the expectation by * babel-jest. */ dontMock(moduleName: string): JestObjectType, /** * Returns a new, unused mock function. Optionally takes a mock * implementation. */ fn, TReturn>( implementation?: (...args: TArguments) => TReturn ): JestMockFn, /** * Determines if the given function is a mocked function. */ isMockFunction(fn: Function): boolean, /** * Given the name of a module, use the automatic mocking system to generate a * mocked version of the module for you. */ genMockFromModule(moduleName: string): any, /** * Mocks a module with an auto-mocked version when it is being required. * * The second argument can be used to specify an explicit module factory that * is being run instead of using Jest's automocking feature. * * The third argument can be used to create virtual mocks -- mocks of modules * that don't exist anywhere in the system. */ mock( moduleName: string, moduleFactory?: any, options?: Object ): JestObjectType, /** * Returns the actual module instead of a mock, bypassing all checks on * whether the module should receive a mock implementation or not. */ requireActual(moduleName: string): any, /** * Returns a mock module instead of the actual module, bypassing all checks * on whether the module should be required normally or not. */ requireMock(moduleName: string): any, /** * Resets the module registry - the cache of all required modules. This is * useful to isolate modules where local state might conflict between tests. */ resetModules(): JestObjectType, /** * Exhausts the micro-task queue (usually interfaced in node via * process.nextTick). */ runAllTicks(): void, /** * Exhausts the macro-task queue (i.e., all tasks queued by setTimeout(), * setInterval(), and setImmediate()). */ runAllTimers(): void, /** * Exhausts all tasks queued by setImmediate(). */ runAllImmediates(): void, /** * Executes only the macro task queue (i.e. all tasks queued by setTimeout() * or setInterval() and setImmediate()). */ advanceTimersByTime(msToRun: number): void, /** * Executes only the macro task queue (i.e. all tasks queued by setTimeout() * or setInterval() and setImmediate()). * * Renamed to `advanceTimersByTime`. */ runTimersToTime(msToRun: number): void, /** * Executes only the macro-tasks that are currently pending (i.e., only the * tasks that have been queued by setTimeout() or setInterval() up to this * point) */ runOnlyPendingTimers(): void, /** * Explicitly supplies the mock object that the module system should return * for the specified module. Note: It is recommended to use jest.mock() * instead. */ setMock(moduleName: string, moduleExports: any): JestObjectType, /** * Indicates that the module system should never return a mocked version of * the specified module from require() (e.g. that it should always return the * real module). */ unmock(moduleName: string): JestObjectType, /** * Instructs Jest to use fake versions of the standard timer functions * (setTimeout, setInterval, clearTimeout, clearInterval, nextTick, * setImmediate and clearImmediate). */ useFakeTimers(): JestObjectType, /** * Instructs Jest to use the real versions of the standard timer functions. */ useRealTimers(): JestObjectType, /** * Creates a mock function similar to jest.fn but also tracks calls to * object[methodName]. */ spyOn(object: Object, methodName: string, accessType?: "get" | "set"): JestMockFn, /** * Set the default timeout interval for tests and before/after hooks in milliseconds. * Note: The default timeout interval is 5 seconds if this method is not called. */ setTimeout(timeout: number): JestObjectType }; type JestSpyType = { calls: JestCallsType }; /** Runs this function after every test inside this context */ declare function afterEach( fn: (done: () => void) => ?Promise, timeout?: number ): void; /** Runs this function before every test inside this context */ declare function beforeEach( fn: (done: () => void) => ?Promise, timeout?: number ): void; /** Runs this function after all tests have finished inside this context */ declare function afterAll( fn: (done: () => void) => ?Promise, timeout?: number ): void; /** Runs this function before any tests have started inside this context */ declare function beforeAll( fn: (done: () => void) => ?Promise, timeout?: number ): void; /** A context for grouping tests together */ declare var describe: { /** * Creates a block that groups together several related tests in one "test suite" */ (name: JestTestName, fn: () => void): void, /** * Only run this describe block */ only(name: JestTestName, fn: () => void): void, /** * Skip running this describe block */ skip(name: JestTestName, fn: () => void): void }; /** An individual test unit */ declare var it: { /** * An individual test unit * * @param {JestTestName} Name of Test * @param {Function} Test * @param {number} Timeout for the test, in milliseconds. */ ( name: JestTestName, fn?: (done: () => void) => ?Promise, timeout?: number ): void, /** * Only run this test * * @param {JestTestName} Name of Test * @param {Function} Test * @param {number} Timeout for the test, in milliseconds. */ only( name: JestTestName, fn?: (done: () => void) => ?Promise, timeout?: number ): void, /** * Skip running this test * * @param {JestTestName} Name of Test * @param {Function} Test * @param {number} Timeout for the test, in milliseconds. */ skip( name: JestTestName, fn?: (done: () => void) => ?Promise, timeout?: number ): void, /** * Run the test concurrently * * @param {JestTestName} Name of Test * @param {Function} Test * @param {number} Timeout for the test, in milliseconds. */ concurrent( name: JestTestName, fn?: (done: () => void) => ?Promise, timeout?: number ): void }; declare function fit( name: JestTestName, fn: (done: () => void) => ?Promise, timeout?: number ): void; /** An individual test unit */ declare var test: typeof it; /** A disabled group of tests */ declare var xdescribe: typeof describe; /** A focused group of tests */ declare var fdescribe: typeof describe; /** A disabled individual test */ declare var xit: typeof it; /** A disabled individual test */ declare var xtest: typeof it; type JestPrettyFormatColors = { comment: { close: string, open: string }, content: { close: string, open: string }, prop: { close: string, open: string }, tag: { close: string, open: string }, value: { close: string, open: string }, }; type JestPrettyFormatIndent = string => string; type JestPrettyFormatRefs = Array; type JestPrettyFormatPrint = any => string; type JestPrettyFormatStringOrNull = string | null; type JestPrettyFormatOptions = {| callToJSON: boolean, edgeSpacing: string, escapeRegex: boolean, highlight: boolean, indent: number, maxDepth: number, min: boolean, plugins: JestPrettyFormatPlugins, printFunctionName: boolean, spacing: string, theme: {| comment: string, content: string, prop: string, tag: string, value: string, |}, |}; type JestPrettyFormatPlugin = { print: ( val: any, serialize: JestPrettyFormatPrint, indent: JestPrettyFormatIndent, opts: JestPrettyFormatOptions, colors: JestPrettyFormatColors, ) => string, test: any => boolean, }; type JestPrettyFormatPlugins = Array; /** The expect function is used every time you want to test a value */ declare var expect: { /** The object that you want to make assertions against */ (value: any): JestExpectType & JestPromiseType & EnzymeMatchersType & DomTestingLibraryType, /** Add additional Jasmine matchers to Jest's roster */ extend(matchers: { [name: string]: JestMatcher }): void, /** Add a module that formats application-specific data structures. */ addSnapshotSerializer(pluginModule: JestPrettyFormatPlugin): void, assertions(expectedAssertions: number): void, hasAssertions(): void, any(value: mixed): JestAsymmetricEqualityType, anything(): any, arrayContaining(value: Array): Array, objectContaining(value: Object): Object, /** Matches any received string that contains the exact expected string. */ stringContaining(value: string): string, stringMatching(value: string | RegExp): string }; // TODO handle return type // http://jasmine.github.io/2.4/introduction.html#section-Spies declare function spyOn(value: mixed, method: string): Object; /** Holds all functions related to manipulating test runner */ declare var jest: JestObjectType; /** * The global Jasmine object, this is generally not exposed as the public API, * using features inside here could break in later versions of Jest. */ declare var jasmine: { DEFAULT_TIMEOUT_INTERVAL: number, any(value: mixed): JestAsymmetricEqualityType, anything(): any, arrayContaining(value: Array): Array, clock(): JestClockType, createSpy(name: string): JestSpyType, createSpyObj( baseName: string, methodNames: Array ): { [methodName: string]: JestSpyType }, objectContaining(value: Object): Object, stringMatching(value: string): string }; ================================================ FILE: flow-typed/npm/lodash_v4.x.x.js ================================================ // flow-typed signature: 213ae107c05372e2489e50a054136496 // flow-typed version: 08e518e6e8/lodash_v4.x.x/flow_>=v0.63.x declare module "lodash" { declare type __CurriedFunction1 = (...r: [AA]) => R; declare type CurriedFunction1 = __CurriedFunction1; declare type __CurriedFunction2 = (( ...r: [AA] ) => CurriedFunction1) & ((...r: [AA, BB]) => R); declare type CurriedFunction2 = __CurriedFunction2; declare type __CurriedFunction3 = (( ...r: [AA] ) => CurriedFunction2) & ((...r: [AA, BB]) => CurriedFunction1) & ((...r: [AA, BB, CC]) => R); declare type CurriedFunction3 = __CurriedFunction3< A, B, C, R, *, *, * >; declare type __CurriedFunction4< A, B, C, D, R, AA: A, BB: B, CC: C, DD: D > = ((...r: [AA]) => CurriedFunction3) & ((...r: [AA, BB]) => CurriedFunction2) & ((...r: [AA, BB, CC]) => CurriedFunction1) & ((...r: [AA, BB, CC, DD]) => R); declare type CurriedFunction4 = __CurriedFunction4< A, B, C, D, R, *, *, *, * >; declare type __CurriedFunction5< A, B, C, D, E, R, AA: A, BB: B, CC: C, DD: D, EE: E > = ((...r: [AA]) => CurriedFunction4) & ((...r: [AA, BB]) => CurriedFunction3) & ((...r: [AA, BB, CC]) => CurriedFunction2) & ((...r: [AA, BB, CC, DD]) => CurriedFunction1) & ((...r: [AA, BB, CC, DD, EE]) => R); declare type CurriedFunction5 = __CurriedFunction5< A, B, C, D, E, R, *, *, *, *, * >; declare type __CurriedFunction6< A, B, C, D, E, F, R, AA: A, BB: B, CC: C, DD: D, EE: E, FF: F > = ((...r: [AA]) => CurriedFunction5) & ((...r: [AA, BB]) => CurriedFunction4) & ((...r: [AA, BB, CC]) => CurriedFunction3) & ((...r: [AA, BB, CC, DD]) => CurriedFunction2) & ((...r: [AA, BB, CC, DD, EE]) => CurriedFunction1) & ((...r: [AA, BB, CC, DD, EE, FF]) => R); declare type CurriedFunction6 = __CurriedFunction6< A, B, C, D, E, F, R, *, *, *, *, *, * >; declare type Curry = (((...r: [A]) => R) => CurriedFunction1) & (((...r: [A, B]) => R) => CurriedFunction2) & (((...r: [A, B, C]) => R) => CurriedFunction3) & (( (...r: [A, B, C, D]) => R ) => CurriedFunction4) & (( (...r: [A, B, C, D, E]) => R ) => CurriedFunction5) & (( (...r: [A, B, C, D, E, F]) => R ) => CurriedFunction6); declare type UnaryFn = (a: A) => R; declare type TemplateSettings = { escape?: RegExp, evaluate?: RegExp, imports?: Object, interpolate?: RegExp, variable?: string }; declare type TruncateOptions = { length?: number, omission?: string, separator?: RegExp | string }; declare type DebounceOptions = { leading?: boolean, maxWait?: number, trailing?: boolean }; declare type ThrottleOptions = { leading?: boolean, trailing?: boolean }; declare type NestedArray = Array>; declare type matchesIterateeShorthand = Object; declare type matchesPropertyIterateeShorthand = [string, any]; declare type propertyIterateeShorthand = string; declare type OPredicate = | ((value: A, key: string, object: O) => any) | matchesIterateeShorthand | matchesPropertyIterateeShorthand | propertyIterateeShorthand; declare type OIterateeWithResult = | Object | string | ((value: V, key: string, object: O) => R); declare type OIteratee = OIterateeWithResult; declare type OFlatMapIteratee = OIterateeWithResult>; declare type Predicate = | ((value: T, index: number, array: Array) => any) | matchesIterateeShorthand | matchesPropertyIterateeShorthand | propertyIterateeShorthand; declare type _ValueOnlyIteratee = (value: T) => mixed; declare type ValueOnlyIteratee = _ValueOnlyIteratee | string; declare type _Iteratee = ( item: T, index: number, array: ?Array ) => mixed; declare type Iteratee = _Iteratee | Object | string; declare type FlatMapIteratee = | ((item: T, index: number, array: ?$ReadOnlyArray) => Array) | Object | string; declare type Comparator = (item: T, item2: T) => boolean; declare type MapIterator = | ((item: T, index: number, array: Array) => U) | propertyIterateeShorthand; declare type ReadOnlyMapIterator = | ((item: T, index: number, array: $ReadOnlyArray) => U) | propertyIterateeShorthand; declare type OMapIterator = | ((item: T, key: string, object: O) => U) | propertyIterateeShorthand; declare class Lodash { // Array chunk(array?: ?Array, size?: ?number): Array>; compact(array?: ?Array): Array; concat(base?: ?Array, ...elements: Array): Array; difference(array?: ?$ReadOnlyArray, values?: ?$ReadOnlyArray): Array; differenceBy( array?: ?$ReadOnlyArray, values?: ?$ReadOnlyArray, iteratee?: ?ValueOnlyIteratee ): T[]; differenceWith(array?: ?$ReadOnlyArray, values?: ?$ReadOnlyArray, comparator?: ?Comparator): T[]; drop(array?: ?Array, n?: ?number): Array; dropRight(array?: ?Array, n?: ?number): Array; dropRightWhile(array?: ?Array, predicate?: ?Predicate): Array; dropWhile(array?: ?Array, predicate?: ?Predicate): Array; fill( array?: ?Array, value?: ?U, start?: ?number, end?: ?number ): Array; findIndex( array: $ReadOnlyArray, predicate?: ?Predicate, fromIndex?: ?number ): number; findIndex( array: void | null, predicate?: ?Predicate, fromIndex?: ?number ): -1; findLastIndex( array: $ReadOnlyArray, predicate?: ?Predicate, fromIndex?: ?number ): number; findLastIndex( array: void | null, predicate?: ?Predicate, fromIndex?: ?number ): -1; // alias of _.head first(array: ?Array): T; flatten(array?: ?Array | X>): Array; flattenDeep(array?: ?any[]): Array; flattenDepth(array?: ?any[], depth?: ?number): any[]; fromPairs(pairs?: ?Array<[A, B]>): { [key: A]: B }; head(array: ?Array): T; indexOf(array: Array, value: T, fromIndex?: number): number; indexOf(array: void | null, value?: ?T, fromIndex?: ?number): -1; initial(array: ?Array): Array; intersection(...arrays?: Array>): Array; //Workaround until (...parameter: T, parameter2: U) works intersectionBy(a1?: ?Array, iteratee?: ?ValueOnlyIteratee): Array; intersectionBy( a1?: ?Array, a2?: ?Array, iteratee?: ?ValueOnlyIteratee ): Array; intersectionBy( a1?: ?Array, a2?: ?Array, a3?: ?Array, iteratee?: ?ValueOnlyIteratee ): Array; intersectionBy( a1?: ?Array, a2?: ?Array, a3?: ?Array, a4?: ?Array, iteratee?: ?ValueOnlyIteratee ): Array; //Workaround until (...parameter: T, parameter2: U) works intersectionWith(a1?: ?Array, comparator?: ?Comparator): Array; intersectionWith( a1?: ?Array, a2?: ?Array, comparator?: ?Comparator ): Array; intersectionWith( a1?: ?Array, a2?: ?Array, a3?: ?Array, comparator?: ?Comparator ): Array; intersectionWith( a1?: ?Array, a2?: ?Array, a3?: ?Array, a4?: ?Array, comparator?: ?Comparator ): Array; join(array: Array, separator?: ?string): string; join(array: void | null, separator?: ?string): ''; last(array: ?Array): T; lastIndexOf(array: Array, value?: ?T, fromIndex?: ?number): number; lastIndexOf(array: void | null, value?: ?T, fromIndex?: ?number): -1; nth(array: T[], n?: ?number): T; nth(array: void | null, n?: ?number): void; pull(array: Array, ...values?: Array): Array; pull(array: T, ...values?: Array): T; pullAll(array: Array, values?: ?Array): Array; pullAll(array: T, values?: ?Array): T; pullAllBy( array: Array, values?: ?Array, iteratee?: ?ValueOnlyIteratee ): Array; pullAllBy( array: T, values?: ?Array, iteratee?: ?ValueOnlyIteratee ): T; pullAllWith(array: T[], values?: ?T[], comparator?: ?Function): T[]; pullAllWith(array: T, values?: ?Array, comparator?: ?Function): T; pullAt(array?: ?Array, ...indexed?: Array): Array; pullAt(array?: ?Array, indexed?: ?Array): Array; remove(array?: ?Array, predicate?: ?Predicate): Array; reverse(array: Array): Array; reverse(array: T): T; slice(array?: ?Array, start?: ?number, end?: ?number): Array; sortedIndex(array: Array, value: T): number; sortedIndex(array: void | null, value: ?T): 0; sortedIndexBy( array: Array, value?: ?T, iteratee?: ?ValueOnlyIteratee ): number; sortedIndexBy( array: void | null, value?: ?T, iteratee?: ?ValueOnlyIteratee ): 0; sortedIndexOf(array: Array, value: T): number; sortedIndexOf(array: void | null, value?: ?T): -1; sortedLastIndex(array: Array, value: T): number; sortedLastIndex(array: void | null, value?: ?T): 0; sortedLastIndexBy( array: Array, value: T, iteratee?: ValueOnlyIteratee ): number; sortedLastIndexBy( array: void | null, value?: ?T, iteratee?: ?ValueOnlyIteratee ): 0; sortedLastIndexOf(array: Array, value: T): number; sortedLastIndexOf(array: void | null, value?: ?T): -1; sortedUniq(array?: ?Array): Array; sortedUniqBy(array?: ?Array, iteratee?: ?(value: T) => mixed): Array; tail(array?: ?Array): Array; take(array?: ?Array, n?: ?number): Array; takeRight(array?: ?Array, n?: ?number): Array; takeRightWhile(array?: ?Array, predicate?: ?Predicate): Array; takeWhile(array?: ?Array, predicate?: ?Predicate): Array; union(...arrays?: Array>): Array; //Workaround until (...parameter: T, parameter2: U) works unionBy(a1?: ?Array, iteratee?: ?ValueOnlyIteratee): Array; unionBy( a1?: ?Array, a2: Array, iteratee?: ValueOnlyIteratee ): Array; unionBy( a1: Array, a2: Array, a3: Array, iteratee?: ValueOnlyIteratee ): Array; unionBy( a1: Array, a2: Array, a3: Array, a4: Array, iteratee?: ValueOnlyIteratee ): Array; //Workaround until (...parameter: T, parameter2: U) works unionWith(a1?: ?Array, comparator?: ?Comparator): Array; unionWith( a1: Array, a2: Array, comparator?: Comparator ): Array; unionWith( a1: Array, a2: Array, a3: Array, comparator?: Comparator ): Array; unionWith( a1: Array, a2: Array, a3: Array, a4: Array, comparator?: Comparator ): Array; uniq(array?: ?Array): Array; uniqBy(array?: ?Array, iteratee?: ?ValueOnlyIteratee): Array; uniqWith(array?: ?Array, comparator?: ?Comparator): Array; unzip(array?: ?Array): Array; unzipWith(array: ?Array, iteratee?: ?Iteratee): Array; without(array?: ?Array, ...values?: Array): Array; xor(...array: Array>): Array; //Workaround until (...parameter: T, parameter2: U) works xorBy(a1?: ?Array, iteratee?: ?ValueOnlyIteratee): Array; xorBy( a1: Array, a2: Array, iteratee?: ValueOnlyIteratee ): Array; xorBy( a1: Array, a2: Array, a3: Array, iteratee?: ValueOnlyIteratee ): Array; xorBy( a1: Array, a2: Array, a3: Array, a4: Array, iteratee?: ValueOnlyIteratee ): Array; //Workaround until (...parameter: T, parameter2: U) works xorWith(a1?: ?Array, comparator?: ?Comparator): Array; xorWith( a1: Array, a2: Array, comparator?: Comparator ): Array; xorWith( a1: Array, a2: Array, a3: Array, comparator?: Comparator ): Array; xorWith( a1: Array, a2: Array, a3: Array, a4: Array, comparator?: Comparator ): Array; zip(a1?: ?A[], a2?: ?B[]): Array<[A, B]>; zip(a1: A[], a2: B[], a3: C[]): Array<[A, B, C]>; zip(a1: A[], a2: B[], a3: C[], a4: D[]): Array<[A, B, C, D]>; zip( a1: A[], a2: B[], a3: C[], a4: D[], a5: E[] ): Array<[A, B, C, D, E]>; zipObject(props: Array, values?: ?Array): { [key: K]: V }; zipObject(props: void | null, values?: ?Array): {}; zipObjectDeep(props: any[], values?: ?any): Object; zipObjectDeep(props: void | null, values?: ?any): {}; zipWith(a1?: ?Array): Array<[A]>; zipWith(a1: Array, iteratee: (A) => T): Array; zipWith(a1: Array, a2: Array): Array<[A, B]>; zipWith( a1: Array, a2: Array, iteratee: (A, B) => T ): Array; zipWith( a1: Array, a2: Array, a3: Array ): Array<[A, B, C]>; zipWith( a1: Array, a2: Array, a3: Array, iteratee: (A, B, C) => T ): Array; zipWith( a1: Array, a2: Array, a3: Array, a4: Array ): Array<[A, B, C, D]>; zipWith( a1: Array, a2: Array, a3: Array, a4: Array, iteratee: (A, B, C, D) => T ): Array; // Collection countBy(array: Array, iteratee?: ?ValueOnlyIteratee): Object; countBy(array: void | null, iteratee?: ?ValueOnlyIteratee): {}; countBy(object: T, iteratee?: ?ValueOnlyIteratee): Object; // alias of _.forEach each(array: Array, iteratee?: ?Iteratee): Array; each(array: T, iteratee?: ?Iteratee): T; each(object: T, iteratee?: ?OIteratee): T; // alias of _.forEachRight eachRight(array: Array, iteratee?: ?Iteratee): Array; eachRight(array: T, iteratee?: ?Iteratee): T; eachRight(object: T, iteratee?: OIteratee): T; every(array?: ?Array, iteratee?: ?Iteratee): boolean; every(object: T, iteratee?: OIteratee): boolean; filter(array?: ?Array, predicate?: ?Predicate): Array; filter( object: T, predicate?: OPredicate ): Array; find( array: $ReadOnlyArray, predicate?: ?Predicate, fromIndex?: ?number ): T | void; find( array: void | null, predicate?: ?Predicate, fromIndex?: ?number ): void; find( object: T, predicate?: OPredicate, fromIndex?: number ): V; findLast( array: ?$ReadOnlyArray, predicate?: ?Predicate, fromIndex?: ?number ): T | void; findLast( object: T, predicate?: ?OPredicate ): V; flatMap( array?: ?$ReadOnlyArray, iteratee?: ?FlatMapIteratee ): Array; flatMap( object: T, iteratee?: OFlatMapIteratee ): Array; flatMapDeep( array?: ?$ReadOnlyArray, iteratee?: ?FlatMapIteratee ): Array; flatMapDeep( object: T, iteratee?: ?OFlatMapIteratee ): Array; flatMapDepth( array?: ?Array, iteratee?: ?FlatMapIteratee, depth?: ?number ): Array; flatMapDepth( object: T, iteratee?: OFlatMapIteratee, depth?: number ): Array; forEach(array: Array, iteratee?: ?Iteratee): Array; forEach(array: T, iteratee?: ?Iteratee): T; forEach(object: T, iteratee?: ?OIteratee): T; forEachRight(array: Array, iteratee?: ?Iteratee): Array; forEachRight(array: T, iteratee?: ?Iteratee): T; forEachRight(object: T, iteratee?: ?OIteratee): T; groupBy( array: $ReadOnlyArray, iteratee?: ?ValueOnlyIteratee ): { [key: V]: Array }; groupBy( array: void | null, iteratee?: ?ValueOnlyIteratee ): {}; groupBy( object: T, iteratee?: ValueOnlyIteratee ): { [key: V]: Array }; includes(array: Array, value: T, fromIndex?: ?number): boolean; includes(array: void | null, value?: ?T, fromIndex?: ?number): false; includes(object: T, value: any, fromIndex?: number): boolean; includes(str: string, value: string, fromIndex?: number): boolean; invokeMap( array?: ?Array, path?: ?((value: T) => Array | string) | Array | string, ...args?: Array ): Array; invokeMap( object: T, path: ((value: any) => Array | string) | Array | string, ...args?: Array ): Array; keyBy( array: $ReadOnlyArray, iteratee?: ?ValueOnlyIteratee ): { [key: V]: ?T }; keyBy( array: void | null, iteratee?: ?ValueOnlyIteratee<*> ): {}; keyBy( object: T, iteratee?: ?ValueOnlyIteratee ): { [key: V]: ?A }; map(array?: ?Array, iteratee?: ?MapIterator): Array; map( array: ?$ReadOnlyArray, iteratee?: ReadOnlyMapIterator ): Array, map( object: ?T, iteratee?: OMapIterator ): Array; map( str: ?string, iteratee?: (char: string, index: number, str: string) => any ): string; orderBy( array: $ReadOnlyArray, iteratees?: ?$ReadOnlyArray> | ?string, orders?: ?$ReadOnlyArray<"asc" | "desc"> | ?string ): Array; orderBy( array: null | void, iteratees?: ?$ReadOnlyArray> | ?string, orders?: ?$ReadOnlyArray<"asc" | "desc"> | ?string ): Array; orderBy( object: T, iteratees?: $ReadOnlyArray> | string, orders?: $ReadOnlyArray<"asc" | "desc"> | string ): Array; partition( array?: ?Array, predicate?: ?Predicate ): [Array, Array]; partition( object: T, predicate?: OPredicate ): [Array, Array]; reduce( array: Array, iteratee?: ( accumulator: U, value: T, index: number, array: ?Array ) => U, accumulator?: U ): U; reduce( array: void | null, iteratee?: ?( accumulator: U, value: T, index: number, array: ?Array ) => U, accumulator?: ?U ): void | null; reduce( object: T, iteratee?: (accumulator: U, value: any, key: string, object: T) => U, accumulator?: U ): U; reduceRight( array: void | null, iteratee?: ?( accumulator: U, value: T, index: number, array: ?Array ) => U, accumulator?: ?U ): void | null; reduceRight( array: Array, iteratee?: ?( accumulator: U, value: T, index: number, array: ?Array ) => U, accumulator?: ?U ): U; reduceRight( object: T, iteratee?: ?(accumulator: U, value: any, key: string, object: T) => U, accumulator?: ?U ): U; reject(array: ?Array, predicate?: Predicate): Array; reject( object?: ?T, predicate?: ?OPredicate ): Array; sample(array: ?Array): T; sample(object: T): V; sampleSize(array?: ?Array, n?: ?number): Array; sampleSize(object: T, n?: number): Array; shuffle(array: ?Array): Array; shuffle(object: T): Array; size(collection: Array | Object | string): number; some(array: ?Array, predicate?: Predicate): boolean; some(array: void | null, predicate?: ?Predicate): false; some( object?: ?T, predicate?: OPredicate ): boolean; sortBy( array: ?$ReadOnlyArray, ...iteratees?: $ReadOnlyArray> ): Array; sortBy( array: ?$ReadOnlyArray, iteratees?: $ReadOnlyArray> ): Array; sortBy( object: T, ...iteratees?: Array> ): Array; sortBy( object: T, iteratees?: $ReadOnlyArray> ): Array; // Date now(): number; // Function after(n: number, fn: Function): Function; ary(func: Function, n?: number): Function; before(n: number, fn: Function): Function; bind(func: Function, thisArg: any, ...partials: Array): Function; bindKey(obj?: ?Object, key?: ?string, ...partials?: Array): Function; curry: Curry; curry(func: Function, arity?: number): Function; curryRight(func: Function, arity?: number): Function; debounce(func: F, wait?: number, options?: DebounceOptions): F; defer(func: Function, ...args?: Array): TimeoutID; delay(func: Function, wait: number, ...args?: Array): TimeoutID; flip(func: Function): Function; memoize(func: F, resolver?: Function): F; negate(predicate: Function): Function; once(func: Function): Function; overArgs(func?: ?Function, ...transforms?: Array): Function; overArgs(func?: ?Function, transforms?: ?Array): Function; partial(func: Function, ...partials: any[]): Function; partialRight(func: Function, ...partials: Array): Function; partialRight(func: Function, partials: Array): Function; rearg(func: Function, ...indexes: Array): Function; rearg(func: Function, indexes: Array): Function; rest(func: Function, start?: number): Function; spread(func: Function): Function; throttle( func: Function, wait?: number, options?: ThrottleOptions ): Function; unary(func: Function): Function; wrap(value?: any, wrapper?: ?Function): Function; // Lang castArray(value: *): any[]; clone(value: T): T; cloneDeep(value: T): T; cloneDeepWith( value: T, customizer?: ?(value: T, key: number | string, object: T, stack: any) => U ): U; cloneWith( value: T, customizer?: ?(value: T, key: number | string, object: T, stack: any) => U ): U; conformsTo( source: T, predicates: T & { [key: string]: (x: any) => boolean } ): boolean; eq(value: any, other: any): boolean; gt(value: any, other: any): boolean; gte(value: any, other: any): boolean; isArguments(value: void | null): false; isArguments(value: any): boolean; isArray(value: Array): true; isArray(value: any): false; isArrayBuffer(value: ArrayBuffer): true; isArrayBuffer(value: any): false; isArrayLike(value: Array | string | {length: number}): true; isArrayLike(value: any): false; isArrayLikeObject(value: {length: number} | Array): true; isArrayLikeObject(value: any): false; isBoolean(value: boolean): true; isBoolean(value: any): false; isBuffer(value: void | null): false; isBuffer(value: any): boolean; isDate(value: Date): true; isDate(value: any): false; isElement(value: Element): true; isElement(value: any): false; isEmpty(value: void | null | '' | {} | [] | number | boolean): true; isEmpty(value: any): boolean; isEqual(value: any, other: any): boolean; isEqualWith( value?: ?T, other?: ?U, customizer?: ?( objValue: any, otherValue: any, key: number | string, object: T, other: U, stack: any ) => boolean | void ): boolean; isError(value: Error): true; isError(value: any): false; isFinite(value: number): boolean; isFinite(value: any): false; isFunction(value: Function): true; isFunction(value: any): false; isInteger(value: number): boolean; isInteger(value: any): false; isLength(value: void | null): false; isLength(value: any): boolean; isMap(value: Map): true; isMap(value: any): false; isMatch(object?: ?Object, source?: ?Object): boolean; isMatchWith( object?: ?T, source?: ?U, customizer?: ?( objValue: any, srcValue: any, key: number | string, object: T, source: U ) => boolean | void ): boolean; isNaN(value: Function | string | void | null | Object): false; isNaN(value: number): boolean; isNative(value: number | string | void | null | Object): false; isNative(value: any): boolean; isNil(value: void | null): true; isNil(value: any): false; isNull(value: null): true; isNull(value: any): false; isNumber(value: number): true; isNumber(value: any): false; isObject(value: Object): true; isObject(value: any): false; isObjectLike(value: void | null): false; isObjectLike(value: any): boolean; isPlainObject(value: Object): true; isPlainObject(value: any): false; isRegExp(value: RegExp): true; isRegExp(value: any): false; isSafeInteger(value: number): boolean; isSafeInteger(value: any): false; isSet(value: Set): true; isSet(value: any): false; isString(value: string): true; isString( value: number | boolean | Function | void | null | Object | Array ): false; isSymbol(value: Symbol): true; isSymbol(value: any): false; isTypedArray(value: $TypedArray): true; isTypedArray(value: any): false; isUndefined(value: void): true; isUndefined(value: any): false; isWeakMap(value: WeakMap): true; isWeakMap(value: any): false; isWeakSet(value: WeakSet): true; isWeakSet(value: any): false; lt(value: any, other: any): boolean; lte(value: any, other: any): boolean; toArray(value: any): Array; toFinite(value: void | null): 0; toFinite(value: any): number; toInteger(value: void | null): 0; toInteger(value: any): number; toLength(value: void | null): 0; toLength(value: any): number; toNumber(value: void | null): 0; toNumber(value: any): number; toPlainObject(value: any): Object; toSafeInteger(value: void | null): 0; toSafeInteger(value: any): number; toString(value: void | null): ''; toString(value: any): string; // Math add(augend: number, addend: number): number; ceil(number: number, precision?: number): number; divide(dividend: number, divisor: number): number; floor(number: number, precision?: number): number; max(array: ?Array): T; maxBy(array: ?Array, iteratee?: Iteratee): T; mean(array: Array<*>): number; meanBy(array: Array, iteratee?: Iteratee): number; min(array: ?Array): T; minBy(array: ?Array, iteratee?: Iteratee): T; multiply(multiplier: number, multiplicand: number): number; round(number: number, precision?: number): number; subtract(minuend: number, subtrahend: number): number; sum(array: Array<*>): number; sumBy(array: Array, iteratee?: Iteratee): number; // number clamp(number?: number, lower?: ?number, upper?: ?number): number; clamp(number: ?number, lower?: ?number, upper?: ?number): 0; inRange(number: number, start?: number, end: number): boolean; random(lower?: number, upper?: number, floating?: boolean): number; // Object assign(object?: ?Object, ...sources?: Array): Object; assignIn(): {}; assignIn(a: A, b: B): A & B; assignIn(a: A, b: B, c: C): A & B & C; assignIn(a: A, b: B, c: C, d: D): A & B & C & D; assignIn(a: A, b: B, c: C, d: D, e: E): A & B & C & D & E; assignInWith(): {}; assignInWith( object: T, s1: A, customizer?: ( objValue: any, srcValue: any, key: string, object: T, source: A ) => any | void ): Object; assignInWith( object: T, s1: A, s2: B, customizer?: ( objValue: any, srcValue: any, key: string, object: T, source: A | B ) => any | void ): Object; assignInWith( object: T, s1: A, s2: B, s3: C, customizer?: ( objValue: any, srcValue: any, key: string, object: T, source: A | B | C ) => any | void ): Object; assignInWith( object: T, s1: A, s2: B, s3: C, s4: D, customizer?: ( objValue: any, srcValue: any, key: string, object: T, source: A | B | C | D ) => any | void ): Object; assignWith(): {}; assignWith( object: T, s1: A, customizer?: ( objValue: any, srcValue: any, key: string, object: T, source: A ) => any | void ): Object; assignWith( object: T, s1: A, s2: B, customizer?: ( objValue: any, srcValue: any, key: string, object: T, source: A | B ) => any | void ): Object; assignWith( object: T, s1: A, s2: B, s3: C, customizer?: ( objValue: any, srcValue: any, key: string, object: T, source: A | B | C ) => any | void ): Object; assignWith( object: T, s1: A, s2: B, s3: C, s4: D, customizer?: ( objValue: any, srcValue: any, key: string, object: T, source: A | B | C | D ) => any | void ): Object; at(object?: ?Object, ...paths: Array): Array; at(object?: ?Object, paths: Array): Array; create(prototype: T, properties: Object): $Supertype; create(prototype: any, properties: void | null): {}; defaults(object?: ?Object, ...sources?: Array): Object; defaultsDeep(object?: ?Object, ...sources?: Array): Object; // alias for _.toPairs entries(object?: ?Object): Array<[string, any]>; // alias for _.toPairsIn entriesIn(object?: ?Object): Array<[string, any]>; // alias for _.assignIn extend(a?: ?A, b?: ?B): A & B; extend(a: A, b: B, c: C): A & B & C; extend(a: A, b: B, c: C, d: D): A & B & C & D; extend(a: A, b: B, c: C, d: D, e: E): A & B & C & D & E; // alias for _.assignInWith extendWith( object?: ?T, s1?: ?A, customizer?: ?( objValue: any, srcValue: any, key: string, object: T, source: A ) => any | void ): Object; extendWith( object: T, s1: A, s2: B, customizer?: ( objValue: any, srcValue: any, key: string, object: T, source: A | B ) => any | void ): Object; extendWith( object: T, s1: A, s2: B, s3: C, customizer?: ( objValue: any, srcValue: any, key: string, object: T, source: A | B | C ) => any | void ): Object; extendWith( object: T, s1: A, s2: B, s3: C, s4: D, customizer?: ( objValue: any, srcValue: any, key: string, object: T, source: A | B | C | D ) => any | void ): Object; findKey( object: T, predicate?: ?OPredicate ): string | void; findKey( object: void | null, predicate?: ?OPredicate ): void; findLastKey( object: T, predicate?: ?OPredicate ): string | void; findLastKey( object: void | null, predicate?: ?OPredicate ): void; forIn(object: Object, iteratee?: ?OIteratee<*>): Object; forIn(object: void | null, iteratee?: ?OIteratee<*>): null; forInRight(object: Object, iteratee?: ?OIteratee<*>): Object; forInRight(object: void | null, iteratee?: ?OIteratee<*>): null; forOwn(object: Object, iteratee?: ?OIteratee<*>): Object; forOwn(object: void | null, iteratee?: ?OIteratee<*>): null; forOwnRight(object: Object, iteratee?: ?OIteratee<*>): Object; forOwnRight(object: void | null, iteratee?: ?OIteratee<*>): null; functions(object?: ?Object): Array; functionsIn(object?: ?Object): Array; get( object?: ?Object | ?Array, path?: ?Array | string, defaultValue?: any ): any; has(object: Object, path: Array | string): boolean; has(object: Object, path: void | null): false; has(object: void | null, path?: ?Array | ?string): false; hasIn(object: Object, path: Array | string): boolean; hasIn(object: Object, path: void | null): false; hasIn(object: void | null, path?: ?Array | ?string): false; invert(object: Object, multiVal?: ?boolean): Object; invert(object: void | null, multiVal?: ?boolean): {}; invertBy(object: Object, iteratee?: ?Function): Object; invertBy(object: void | null, iteratee?: ?Function): {}; invoke( object?: ?Object, path?: ?Array | string, ...args?: Array ): any; keys(object?: ?{ [key: K]: any }): Array; keys(object?: ?Object): Array; keysIn(object?: ?Object): Array; mapKeys(object: Object, iteratee?: ?OIteratee<*>): Object; mapKeys(object: void | null, iteratee?: ?OIteratee<*>): {}; mapValues(object: Object, iteratee?: ?OIteratee<*>): Object; mapValues(object: void | null, iteratee?: ?OIteratee<*>): {}; merge(object?: ?Object, ...sources?: Array): Object; mergeWith(): {}; mergeWith( object: T, customizer?: ( objValue: any, srcValue: any, key: string, object: T, source: A ) => any | void ): Object; mergeWith( object: T, s1: A, s2: B, customizer?: ( objValue: any, srcValue: any, key: string, object: T, source: A | B ) => any | void ): Object; mergeWith( object: T, s1: A, s2: B, s3: C, customizer?: ( objValue: any, srcValue: any, key: string, object: T, source: A | B | C ) => any | void ): Object; mergeWith( object: T, s1: A, s2: B, s3: C, s4: D, customizer?: ( objValue: any, srcValue: any, key: string, object: T, source: A | B | C | D ) => any | void ): Object; omit(object?: ?Object, ...props: Array): Object; omit(object?: ?Object, props: Array): Object; omitBy( object: T, predicate?: ?OPredicate ): Object; omitBy( object: T, predicate?: ?OPredicate ): {}; pick(object?: ?Object, ...props: Array): Object; pick(object?: ?Object, props: Array): Object; pickBy( object: T, predicate?: ?OPredicate ): Object; pickBy( object: T, predicate?: ?OPredicate ): {}; result( object?: ?Object, path?: ?Array | string, defaultValue?: any ): any; set(object: Object, path?: ?Array | string, value: any): Object; set( object: T, path?: ?Array | string, value?: ?any): T; setWith( object: T, path?: ?Array | string, value: any, customizer?: (nsValue: any, key: string, nsObject: T) => any ): Object; setWith( object: T, path?: ?Array | string, value?: ?any, customizer?: ?(nsValue: any, key: string, nsObject: T) => any ): T; toPairs(object?: ?Object | Array<*>): Array<[string, any]>; toPairsIn(object?: ?Object): Array<[string, any]>; transform( collection: Object | $ReadOnlyArray, iteratee?: ?OIteratee<*>, accumulator?: any ): any; transform( collection: void | null, iteratee?: ?OIteratee<*>, accumulator?: ?any ): {}; unset(object: Object, path?: ?Array | ?string): boolean; unset(object: void | null, path?: ?Array | ?string): true; update(object: Object, path: string[] | string, updater: Function): Object; update( object: T, path?: ?string[] | ?string, updater?: ?Function): T; updateWith( object: Object, path?: ?string[] | ?string, updater?: ?Function, customizer?: ?Function ): Object; updateWith( object: T, path?: ?string[] | ?string, updater?: ?Function, customizer?: ?Function ): T; values(object?: ?Object): Array; valuesIn(object?: ?Object): Array; // Seq // harder to read, but this is _() (value: any): any; chain(value: T): any; tap(value: T, interceptor: (value: T) => any): T; thru(value: T1, interceptor: (value: T1) => T2): T2; // TODO: _.prototype.* // String camelCase(string: string): string; camelCase(string: void | null): ''; capitalize(string: string): string; capitalize(string: void | null): ''; deburr(string: string): string; deburr(string: void | null): ''; endsWith(string: string, target?: string, position?: ?number): boolean; endsWith(string: void | null, target?: ?string, position?: ?number): false; escape(string: string): string; escape(string: void | null): ''; escapeRegExp(string: string): string; escapeRegExp(string: void | null): ''; kebabCase(string: string): string; kebabCase(string: void | null): ''; lowerCase(string: string): string; lowerCase(string: void | null): ''; lowerFirst(string: string): string; lowerFirst(string: void | null): ''; pad(string?: ?string, length?: ?number, chars?: ?string): string; padEnd(string?: ?string, length?: ?number, chars?: ?string): string; padStart(string?: ?string, length?: ?number, chars?: ?string): string; parseInt(string: string, radix?: ?number): number; repeat(string: string, n?: ?number): string; repeat(string: void | null, n?: ?number): ''; replace( string: string, pattern: RegExp | string, replacement: ((string: string) => string) | string ): string; replace( string: void | null, pattern?: ?RegExp | ?string, replacement: ?((string: string) => string) | ?string ): ''; snakeCase(string: string): string; snakeCase(string: void | null): ''; split( string?: ?string, separator?: ?RegExp | ?string, limit?: ?number ): Array; startCase(string: string): string; startCase(string: void | null): ''; startsWith(string: string, target?: string, position?: number): boolean; startsWith(string: void | null, target?: ?string, position?: ?number): false; template(string?: ?string, options?: ?TemplateSettings): Function; toLower(string: string): string; toLower(string: void | null): ''; toUpper(string: string): string; toUpper(string: void | null): ''; trim(string: string, chars?: string): string; trim(string: void | null, chars?: ?string): ''; trimEnd(string: string, chars?: ?string): string; trimEnd(string: void | null, chars?: ?string): ''; trimStart(string: string, chars?: ?string): string; trimStart(string: void | null, chars?: ?string): ''; truncate(string: string, options?: TruncateOptions): string; truncate(string: void | null, options?: ?TruncateOptions): ''; unescape(string: string): string; unescape(string: void | null): ''; upperCase(string: string): string; upperCase(string: void | null): ''; upperFirst(string: string): string; upperFirst(string: void | null): ''; words(string?: ?string, pattern?: ?RegExp | ?string): Array; // Util attempt(func: Function, ...args: Array): any; bindAll(object: Object, methodNames?: ?Array): Object; bindAll(object: T, methodNames?: ?Array): T; bindAll(object: Object, ...methodNames: Array): Object; cond(pairs?: ?NestedArray): Function; conforms(source?: ?Object): Function; constant(value: T): () => T; defaultTo( value: T1, defaultValue: T2 ): T1; // NaN is a number instead of its own type, otherwise it would behave like null/void defaultTo(value: T1, defaultValue: T2): T1 | T2; defaultTo(value: T1, defaultValue: T2): T2; flow: ($ComposeReverse & (funcs: Array) => Function); flowRight: ($Compose & (funcs: Array) => Function); identity(value: T): T; iteratee(func?: any): Function; matches(source?: ?Object): Function; matchesProperty(path?: ?Array | string, srcValue: any): Function; method(path?: ?Array | string, ...args?: Array): Function; methodOf(object?: ?Object, ...args?: Array): Function; mixin( object?: T, source: Object, options?: { chain: boolean } ): T; noConflict(): Lodash; noop(...args: Array): void; nthArg(n?: ?number): Function; over(...iteratees: Array): Function; over(iteratees: Array): Function; overEvery(...predicates: Array): Function; overEvery(predicates: Array): Function; overSome(...predicates: Array): Function; overSome(predicates: Array): Function; property(path?: ?Array | string): Function; propertyOf(object?: ?Object): Function; range(start: number, end: number, step?: number): Array; range(end: number, step?: number): Array; rangeRight(start?: ?number, end?: ?number, step?: ?number): Array; rangeRight(end?: ?number, step?: ?number): Array; runInContext(context?: ?Object): Function; stubArray(): Array<*>; stubFalse(): false; stubObject(): {}; stubString(): ""; stubTrue(): true; times(n?: ?number, ...rest?: Array): Array; times(n: number, iteratee: (i: number) => T): Array; toPath(value: any): Array; uniqueId(prefix?: ?string): string; // Properties VERSION: string; templateSettings: TemplateSettings; } declare module.exports: Lodash; } declare module "lodash/fp" { declare type __CurriedFunction1 = (...r: [AA]) => R; declare type CurriedFunction1 = __CurriedFunction1; declare type __CurriedFunction2 = (( ...r: [AA] ) => CurriedFunction1) & ((...r: [AA, BB]) => R); declare type CurriedFunction2 = __CurriedFunction2; declare type __CurriedFunction3 = (( ...r: [AA] ) => CurriedFunction2) & ((...r: [AA, BB]) => CurriedFunction1) & ((...r: [AA, BB, CC]) => R); declare type CurriedFunction3 = __CurriedFunction3< A, B, C, R, *, *, * >; declare type __CurriedFunction4< A, B, C, D, R, AA: A, BB: B, CC: C, DD: D > = ((...r: [AA]) => CurriedFunction3) & ((...r: [AA, BB]) => CurriedFunction2) & ((...r: [AA, BB, CC]) => CurriedFunction1) & ((...r: [AA, BB, CC, DD]) => R); declare type CurriedFunction4 = __CurriedFunction4< A, B, C, D, R, *, *, *, * >; declare type __CurriedFunction5< A, B, C, D, E, R, AA: A, BB: B, CC: C, DD: D, EE: E > = ((...r: [AA]) => CurriedFunction4) & ((...r: [AA, BB]) => CurriedFunction3) & ((...r: [AA, BB, CC]) => CurriedFunction2) & ((...r: [AA, BB, CC, DD]) => CurriedFunction1) & ((...r: [AA, BB, CC, DD, EE]) => R); declare type CurriedFunction5 = __CurriedFunction5< A, B, C, D, E, R, *, *, *, *, * >; declare type __CurriedFunction6< A, B, C, D, E, F, R, AA: A, BB: B, CC: C, DD: D, EE: E, FF: F > = ((...r: [AA]) => CurriedFunction5) & ((...r: [AA, BB]) => CurriedFunction4) & ((...r: [AA, BB, CC]) => CurriedFunction3) & ((...r: [AA, BB, CC, DD]) => CurriedFunction2) & ((...r: [AA, BB, CC, DD, EE]) => CurriedFunction1) & ((...r: [AA, BB, CC, DD, EE, FF]) => R); declare type CurriedFunction6 = __CurriedFunction6< A, B, C, D, E, F, R, *, *, *, *, *, * >; declare type Curry = (((...r: [A]) => R) => CurriedFunction1) & (((...r: [A, B]) => R) => CurriedFunction2) & (((...r: [A, B, C]) => R) => CurriedFunction3) & (( (...r: [A, B, C, D]) => R ) => CurriedFunction4) & (( (...r: [A, B, C, D, E]) => R ) => CurriedFunction5) & (( (...r: [A, B, C, D, E, F]) => R ) => CurriedFunction6); declare type UnaryFn = (a: A) => R; declare type TemplateSettings = { escape?: RegExp, evaluate?: RegExp, imports?: Object, interpolate?: RegExp, variable?: string }; declare type TruncateOptions = { length?: number, omission?: string, separator?: RegExp | string }; declare type DebounceOptions = { leading?: boolean, maxWait?: number, trailing?: boolean }; declare type ThrottleOptions = { leading?: boolean, trailing?: boolean }; declare type NestedArray = Array>; declare type matchesIterateeShorthand = Object; declare type matchesPropertyIterateeShorthand = [string, any]; declare type propertyIterateeShorthand = string; declare type OPredicate = | ((value: A) => any) | matchesIterateeShorthand | matchesPropertyIterateeShorthand | propertyIterateeShorthand; declare type OIterateeWithResult = Object | string | ((value: V) => R); declare type OIteratee = OIterateeWithResult; declare type OFlatMapIteratee = OIterateeWithResult>; declare type Predicate = | ((value: T) => any) | matchesIterateeShorthand | matchesPropertyIterateeShorthand | propertyIterateeShorthand; declare type _ValueOnlyIteratee = (value: T) => mixed; declare type ValueOnlyIteratee = _ValueOnlyIteratee | string; declare type _Iteratee = (item: T) => mixed; declare type Iteratee = _Iteratee | Object | string; declare type FlatMapIteratee = | ((item: T) => Array) | Object | string; declare type Comparator = (item: T, item2: T) => boolean; declare type MapIterator = ((item: T) => U) | propertyIterateeShorthand; declare type OMapIterator = | ((item: T) => U) | propertyIterateeShorthand; declare class Lodash { // Array chunk(size: number): (array: Array) => Array>; chunk(size: number, array: Array): Array>; compact(array?: ?$ReadOnlyArray): Array; concat | T, B: Array | U>( base: A ): (elements: B) => Array; concat | T, B: Array | U>( base: A, elements: B ): Array; difference(values: $ReadOnlyArray): (array: $ReadOnlyArray) => T[]; difference(values: $ReadOnlyArray, array: $ReadOnlyArray): T[]; differenceBy( iteratee: ValueOnlyIteratee ): ((values: $ReadOnlyArray) => (array: $ReadOnlyArray) => T[]) & ((values: $ReadOnlyArray, array: $ReadOnlyArray) => T[]); differenceBy( iteratee: ValueOnlyIteratee, values: $ReadOnlyArray ): (array: $ReadOnlyArray) => T[]; differenceBy( iteratee: ValueOnlyIteratee, values: $ReadOnlyArray, array: $ReadOnlyArray ): T[]; differenceWith( values: $ReadOnlyArray ): ((comparator: Comparator) => (array: $ReadOnlyArray) => T[]) & ((comparator: Comparator, array: $ReadOnlyArray) => T[]); differenceWith( values: $ReadOnlyArray, comparator: Comparator ): (array: $ReadOnlyArray) => T[]; differenceWith(values: $ReadOnlyArray, comparator: Comparator, array: $ReadOnlyArray): T[]; drop(n: number): (array: Array) => Array; drop(n: number, array: Array): Array; dropLast(n: number): (array: Array) => Array; dropLast(n: number, array: Array): Array; dropRight(n: number): (array: Array) => Array; dropRight(n: number, array: Array): Array; dropRightWhile(predicate: Predicate): (array: Array) => Array; dropRightWhile(predicate: Predicate, array: Array): Array; dropWhile(predicate: Predicate): (array: Array) => Array; dropWhile(predicate: Predicate, array: Array): Array; dropLastWhile(predicate: Predicate): (array: Array) => Array; dropLastWhile(predicate: Predicate, array: Array): Array; fill( start: number ): (( end: number ) => ((value: U) => (array: Array) => Array) & ((value: U, array: Array) => Array)) & ((end: number, value: U) => (array: Array) => Array) & ((end: number, value: U, array: Array) => Array); fill( start: number, end: number ): ((value: U) => (array: Array) => Array) & ((value: U, array: Array) => Array); fill( start: number, end: number, value: U ): (array: Array) => Array; fill( start: number, end: number, value: U, array: Array ): Array; findIndex(predicate: Predicate): (array: $ReadOnlyArray) => number; findIndex(predicate: Predicate, array: $ReadOnlyArray): number; findIndexFrom( predicate: Predicate ): ((fromIndex: number) => (array: $ReadOnlyArray) => number) & ((fromIndex: number, array: $ReadOnlyArray) => number); findIndexFrom( predicate: Predicate, fromIndex: number ): (array: $ReadOnlyArray) => number; findIndexFrom( predicate: Predicate, fromIndex: number, array: $ReadOnlyArray ): number; findLastIndex( predicate: Predicate ): (array: $ReadOnlyArray) => number; findLastIndex(predicate: Predicate, array: $ReadOnlyArray): number; findLastIndexFrom( predicate: Predicate ): ((fromIndex: number) => (array: $ReadOnlyArray) => number) & ((fromIndex: number, array: $ReadOnlyArray) => number); findLastIndexFrom( predicate: Predicate, fromIndex: number ): (array: $ReadOnlyArray) => number; findLastIndexFrom( predicate: Predicate, fromIndex: number, array: $ReadOnlyArray ): number; // alias of _.head first(array: Array): T; flatten(array: Array | X>): Array; unnest(array: Array | X>): Array; flattenDeep(array: any[]): Array; flattenDepth(depth: number): (array: any[]) => any[]; flattenDepth(depth: number, array: any[]): any[]; fromPairs(pairs: Array<[A, B]>): { [key: A]: B }; head(array: Array): T; indexOf(value: T): (array: Array) => number; indexOf(value: T, array: Array): number; indexOfFrom( value: T ): ((fromIndex: number) => (array: Array) => number) & ((fromIndex: number, array: Array) => number); indexOfFrom(value: T, fromIndex: number): (array: Array) => number; indexOfFrom(value: T, fromIndex: number, array: Array): number; initial(array: Array): Array; init(array: Array): Array; intersection(a1: Array): (a2: Array) => Array; intersection(a1: Array, a2: Array): Array; intersectionBy( iteratee: ValueOnlyIteratee ): ((a1: Array) => (a2: Array) => Array) & ((a1: Array, a2: Array) => Array); intersectionBy( iteratee: ValueOnlyIteratee, a1: Array ): (a2: Array) => Array; intersectionBy( iteratee: ValueOnlyIteratee, a1: Array, a2: Array ): Array; intersectionWith( comparator: Comparator ): ((a1: Array) => (a2: Array) => Array) & ((a1: Array, a2: Array) => Array); intersectionWith( comparator: Comparator, a1: Array ): (a2: Array) => Array; intersectionWith( comparator: Comparator, a1: Array, a2: Array ): Array; join(separator: string): (array: Array) => string; join(separator: string, array: Array): string; last(array: Array): T; lastIndexOf(value: T): (array: Array) => number; lastIndexOf(value: T, array: Array): number; lastIndexOfFrom( value: T ): ((fromIndex: number) => (array: Array) => number) & ((fromIndex: number, array: Array) => number); lastIndexOfFrom( value: T, fromIndex: number ): (array: Array) => number; lastIndexOfFrom(value: T, fromIndex: number, array: Array): number; nth(n: number): (array: T[]) => T; nth(n: number, array: T[]): T; pull(value: T): (array: Array) => Array; pull(value: T, array: Array): Array; pullAll(values: Array): (array: Array) => Array; pullAll(values: Array, array: Array): Array; pullAllBy( iteratee: ValueOnlyIteratee ): ((values: Array) => (array: Array) => Array) & ((values: Array, array: Array) => Array); pullAllBy( iteratee: ValueOnlyIteratee, values: Array ): (array: Array) => Array; pullAllBy( iteratee: ValueOnlyIteratee, values: Array, array: Array ): Array; pullAllWith( comparator: Function ): ((values: T[]) => (array: T[]) => T[]) & ((values: T[], array: T[]) => T[]); pullAllWith(comparator: Function, values: T[]): (array: T[]) => T[]; pullAllWith(comparator: Function, values: T[], array: T[]): T[]; pullAt(indexed: Array): (array: Array) => Array; pullAt(indexed: Array, array: Array): Array; remove(predicate: Predicate): (array: Array) => Array; remove(predicate: Predicate, array: Array): Array; reverse(array: Array): Array; slice( start: number ): ((end: number) => (array: Array) => Array) & ((end: number, array: Array) => Array); slice(start: number, end: number): (array: Array) => Array; slice(start: number, end: number, array: Array): Array; sortedIndex(value: T): (array: Array) => number; sortedIndex(value: T, array: Array): number; sortedIndexBy( iteratee: ValueOnlyIteratee ): ((value: T) => (array: Array) => number) & ((value: T, array: Array) => number); sortedIndexBy( iteratee: ValueOnlyIteratee, value: T ): (array: Array) => number; sortedIndexBy( iteratee: ValueOnlyIteratee, value: T, array: Array ): number; sortedIndexOf(value: T): (array: Array) => number; sortedIndexOf(value: T, array: Array): number; sortedLastIndex(value: T): (array: Array) => number; sortedLastIndex(value: T, array: Array): number; sortedLastIndexBy( iteratee: ValueOnlyIteratee ): ((value: T) => (array: Array) => number) & ((value: T, array: Array) => number); sortedLastIndexBy( iteratee: ValueOnlyIteratee, value: T ): (array: Array) => number; sortedLastIndexBy( iteratee: ValueOnlyIteratee, value: T, array: Array ): number; sortedLastIndexOf(value: T): (array: Array) => number; sortedLastIndexOf(value: T, array: Array): number; sortedUniq(array: Array): Array; sortedUniqBy( iteratee: (value: T) => mixed ): (array: Array) => Array; sortedUniqBy(iteratee: (value: T) => mixed, array: Array): Array; tail(array: Array): Array; take(n: number): (array: Array) => Array; take(n: number, array: Array): Array; takeRight(n: number): (array: Array) => Array; takeRight(n: number, array: Array): Array; takeLast(n: number): (array: Array) => Array; takeLast(n: number, array: Array): Array; takeRightWhile(predicate: Predicate): (array: Array) => Array; takeRightWhile(predicate: Predicate, array: Array): Array; takeLastWhile(predicate: Predicate): (array: Array) => Array; takeLastWhile(predicate: Predicate, array: Array): Array; takeWhile(predicate: Predicate): (array: Array) => Array; takeWhile(predicate: Predicate, array: Array): Array; union(a1: Array): (a2: Array) => Array; union(a1: Array, a2: Array): Array; unionBy( iteratee: ValueOnlyIteratee ): ((a1: Array) => (a2: Array) => Array) & ((a1: Array, a2: Array) => Array); unionBy( iteratee: ValueOnlyIteratee, a1: Array ): (a2: Array) => Array; unionBy( iteratee: ValueOnlyIteratee, a1: Array, a2: Array ): Array; unionWith( comparator: Comparator ): ((a1: Array) => (a2: Array) => Array) & ((a1: Array, a2: Array) => Array); unionWith( comparator: Comparator, a1: Array ): (a2: Array) => Array; unionWith( comparator: Comparator, a1: Array, a2: Array ): Array; uniq(array: Array): Array; uniqBy(iteratee: ValueOnlyIteratee): (array: Array) => Array; uniqBy(iteratee: ValueOnlyIteratee, array: Array): Array; uniqWith(comparator: Comparator): (array: Array) => Array; uniqWith(comparator: Comparator, array: Array): Array; unzip(array: Array): Array; unzipWith(iteratee: Iteratee): (array: Array) => Array; unzipWith(iteratee: Iteratee, array: Array): Array; without(values: Array): (array: Array) => Array; without(values: Array, array: Array): Array; xor(a1: Array): (a2: Array) => Array; xor(a1: Array, a2: Array): Array; symmetricDifference(a1: Array): (a2: Array) => Array; symmetricDifference(a1: Array, a2: Array): Array; xorBy( iteratee: ValueOnlyIteratee ): ((a1: Array) => (a2: Array) => Array) & ((a1: Array, a2: Array) => Array); xorBy( iteratee: ValueOnlyIteratee, a1: Array ): (a2: Array) => Array; xorBy( iteratee: ValueOnlyIteratee, a1: Array, a2: Array ): Array; symmetricDifferenceBy( iteratee: ValueOnlyIteratee ): ((a1: Array) => (a2: Array) => Array) & ((a1: Array, a2: Array) => Array); symmetricDifferenceBy( iteratee: ValueOnlyIteratee, a1: Array ): (a2: Array) => Array; symmetricDifferenceBy( iteratee: ValueOnlyIteratee, a1: Array, a2: Array ): Array; xorWith( comparator: Comparator ): ((a1: Array) => (a2: Array) => Array) & ((a1: Array, a2: Array) => Array); xorWith( comparator: Comparator, a1: Array ): (a2: Array) => Array; xorWith(comparator: Comparator, a1: Array, a2: Array): Array; symmetricDifferenceWith( comparator: Comparator ): ((a1: Array) => (a2: Array) => Array) & ((a1: Array, a2: Array) => Array); symmetricDifferenceWith( comparator: Comparator, a1: Array ): (a2: Array) => Array; symmetricDifferenceWith( comparator: Comparator, a1: Array, a2: Array ): Array; zip(a1: A[]): (a2: B[]) => Array<[A, B]>; zip(a1: A[], a2: B[]): Array<[A, B]>; zipAll(arrays: Array>): Array; zipObject(props?: Array): (values?: Array) => { [key: K]: V }; zipObject(props?: Array, values?: Array): { [key: K]: V }; zipObj(props: Array): (values: Array) => Object; zipObj(props: Array, values: Array): Object; zipObjectDeep(props: any[]): (values: any) => Object; zipObjectDeep(props: any[], values: any): Object; zipWith( iteratee: Iteratee ): ((a1: NestedArray) => (a2: NestedArray) => Array) & ((a1: NestedArray, a2: NestedArray) => Array); zipWith( iteratee: Iteratee, a1: NestedArray ): (a2: NestedArray) => Array; zipWith( iteratee: Iteratee, a1: NestedArray, a2: NestedArray ): Array; // Collection countBy( iteratee: ValueOnlyIteratee ): (collection: Array | { [id: any]: T }) => { [string]: number }; countBy( iteratee: ValueOnlyIteratee, collection: Array | { [id: any]: T } ): { [string]: number }; // alias of _.forEach each( iteratee: Iteratee | OIteratee ): (collection: Array | { [id: any]: T }) => Array; each( iteratee: Iteratee | OIteratee, collection: Array | { [id: any]: T } ): Array; // alias of _.forEachRight eachRight( iteratee: Iteratee | OIteratee ): (collection: Array | { [id: any]: T }) => Array; eachRight( iteratee: Iteratee | OIteratee, collection: Array | { [id: any]: T } ): Array; every( iteratee: Iteratee | OIteratee ): (collection: Array | { [id: any]: T }) => boolean; every( iteratee: Iteratee | OIteratee, collection: Array | { [id: any]: T } ): boolean; all( iteratee: Iteratee | OIteratee ): (collection: Array | { [id: any]: T }) => boolean; all( iteratee: Iteratee | OIteratee, collection: Array | { [id: any]: T } ): boolean; filter( predicate: Predicate | OPredicate ): (collection: Array | { [id: any]: T }) => Array; filter( predicate: Predicate | OPredicate, collection: Array | { [id: any]: T } ): Array; find( predicate: Predicate | OPredicate ): (collection: $ReadOnlyArray | { [id: any]: T }) => T | void; find( predicate: Predicate | OPredicate, collection: $ReadOnlyArray | { [id: any]: T } ): T | void; findFrom( predicate: Predicate | OPredicate ): (( fromIndex: number ) => (collection: $ReadOnlyArray | { [id: any]: T }) => T | void) & (( fromIndex: number, collection: $ReadOnlyArray | { [id: any]: T } ) => T | void); findFrom( predicate: Predicate | OPredicate, fromIndex: number ): (collection: Array | { [id: any]: T }) => T | void; findFrom( predicate: Predicate | OPredicate, fromIndex: number, collection: $ReadOnlyArray | { [id: any]: T } ): T | void; findLast( predicate: Predicate | OPredicate ): (collection: $ReadOnlyArray | { [id: any]: T }) => T | void; findLast( predicate: Predicate | OPredicate, collection: $ReadOnlyArray | { [id: any]: T } ): T | void; findLastFrom( predicate: Predicate | OPredicate ): (( fromIndex: number ) => (collection: $ReadOnlyArray | { [id: any]: T }) => T | void) & (( fromIndex: number, collection: $ReadOnlyArray | { [id: any]: T } ) => T | void); findLastFrom( predicate: Predicate | OPredicate, fromIndex: number ): (collection: $ReadOnlyArray | { [id: any]: T }) => T | void; findLastFrom( predicate: Predicate | OPredicate, fromIndex: number, collection: $ReadOnlyArray | { [id: any]: T } ): T | void; flatMap( iteratee: FlatMapIteratee | OFlatMapIteratee ): (collection: Array | { [id: any]: T }) => Array; flatMap( iteratee: FlatMapIteratee | OFlatMapIteratee, collection: Array | { [id: any]: T } ): Array; flatMapDeep( iteratee: FlatMapIteratee | OFlatMapIteratee ): (collection: Array | { [id: any]: T }) => Array; flatMapDeep( iteratee: FlatMapIteratee | OFlatMapIteratee, collection: Array | { [id: any]: T } ): Array; flatMapDepth( iteratee: FlatMapIteratee | OFlatMapIteratee ): (( depth: number ) => (collection: Array | { [id: any]: T }) => Array) & ((depth: number, collection: Array | { [id: any]: T }) => Array); flatMapDepth( iteratee: FlatMapIteratee | OFlatMapIteratee, depth: number ): (collection: Array | { [id: any]: T }) => Array; flatMapDepth( iteratee: FlatMapIteratee | OFlatMapIteratee, depth: number, collection: Array | { [id: any]: T } ): Array; forEach( iteratee: Iteratee | OIteratee ): (collection: Array | { [id: any]: T }) => Array; forEach( iteratee: Iteratee | OIteratee, collection: Array | { [id: any]: T } ): Array; forEachRight( iteratee: Iteratee | OIteratee ): (collection: Array | { [id: any]: T }) => Array; forEachRight( iteratee: Iteratee | OIteratee, collection: Array | { [id: any]: T } ): Array; groupBy( iteratee: ValueOnlyIteratee ): ( collection: $ReadOnlyArray | { [id: any]: T } ) => { [key: V]: Array }; groupBy( iteratee: ValueOnlyIteratee, collection: $ReadOnlyArray | { [id: any]: T } ): { [key: V]: Array }; includes(value: T): (collection: Array | { [id: any]: T }) => boolean; includes(value: T, collection: Array | { [id: any]: T }): boolean; includes(value: string): (str: string) => boolean; includes(value: string, str: string): boolean; contains(value: string): (str: string) => boolean; contains(value: string, str: string): boolean; contains(value: T): (collection: Array | { [id: any]: T }) => boolean; contains(value: T, collection: Array | { [id: any]: T }): boolean; includesFrom( value: string ): ((fromIndex: number) => (str: string) => boolean) & ((fromIndex: number, str: string) => boolean); includesFrom(value: string, fromIndex: number): (str: string) => boolean; includesFrom(value: string, fromIndex: number, str: string): boolean; includesFrom( value: T ): ((fromIndex: number) => (collection: Array) => boolean) & ((fromIndex: number, collection: Array) => boolean); includesFrom( value: T, fromIndex: number ): (collection: Array) => boolean; includesFrom(value: T, fromIndex: number, collection: Array): boolean; invokeMap( path: ((value: T) => Array | string) | Array | string ): (collection: Array | { [id: any]: T }) => Array; invokeMap( path: ((value: T) => Array | string) | Array | string, collection: Array | { [id: any]: T } ): Array; invokeArgsMap( path: ((value: T) => Array | string) | Array | string ): (( collection: Array | { [id: any]: T } ) => (args: Array) => Array) & (( collection: Array | { [id: any]: T }, args: Array ) => Array); invokeArgsMap( path: ((value: T) => Array | string) | Array | string, collection: Array | { [id: any]: T } ): (args: Array) => Array; invokeArgsMap( path: ((value: T) => Array | string) | Array | string, collection: Array | { [id: any]: T }, args: Array ): Array; keyBy( iteratee: ValueOnlyIteratee ): (collection: $ReadOnlyArray | { [id: any]: T }) => { [key: V]: T }; keyBy( iteratee: ValueOnlyIteratee, collection: $ReadOnlyArray | { [id: any]: T } ): { [key: V]: T }; indexBy( iteratee: ValueOnlyIteratee ): (collection: $ReadOnlyArray | { [id: any]: T }) => { [key: V]: T }; indexBy( iteratee: ValueOnlyIteratee, collection: $ReadOnlyArray | { [id: any]: T } ): { [key: V]: T }; map( iteratee: MapIterator | OMapIterator ): (collection: Array | { [id: any]: T }) => Array; map( iteratee: MapIterator | OMapIterator, collection: Array | { [id: any]: T } ): Array; map(iteratee: (char: string) => any): (str: string) => string; map(iteratee: (char: string) => any, str: string): string; pluck( iteratee: MapIterator | OMapIterator ): (collection: Array | { [id: any]: T }) => Array; pluck( iteratee: MapIterator | OMapIterator, collection: Array | { [id: any]: T } ): Array; pluck(iteratee: (char: string) => any): (str: string) => string; pluck(iteratee: (char: string) => any, str: string): string; orderBy( iteratees: $ReadOnlyArray | OIteratee<*>> | string ): (( orders: $ReadOnlyArray<"asc" | "desc"> | string ) => (collection: $ReadOnlyArray | { [id: any]: T }) => Array) & (( orders: $ReadOnlyArray<"asc" | "desc"> | string, collection: $ReadOnlyArray | { [id: any]: T } ) => Array); orderBy( iteratees: $ReadOnlyArray | OIteratee<*>> | string, orders: $ReadOnlyArray<"asc" | "desc"> | string ): (collection: $ReadOnlyArray | { [id: any]: T }) => Array; orderBy( iteratees: $ReadOnlyArray | OIteratee<*>> | string, orders: $ReadOnlyArray<"asc" | "desc"> | string, collection: $ReadOnlyArray | { [id: any]: T } ): Array; partition( predicate: Predicate | OPredicate ): (collection: Array | { [id: any]: T }) => [Array, Array]; partition( predicate: Predicate | OPredicate, collection: Array | { [id: any]: T } ): [Array, Array]; reduce( iteratee: (accumulator: U, value: T) => U ): ((accumulator: U) => (collection: Array | { [id: any]: T }) => U) & ((accumulator: U, collection: Array | { [id: any]: T }) => U); reduce( iteratee: (accumulator: U, value: T) => U, accumulator: U ): (collection: Array | { [id: any]: T }) => U; reduce( iteratee: (accumulator: U, value: T) => U, accumulator: U, collection: Array | { [id: any]: T } ): U; reduceRight( iteratee: (value: T, accumulator: U) => U ): ((accumulator: U) => (collection: Array | { [id: any]: T }) => U) & ((accumulator: U, collection: Array | { [id: any]: T }) => U); reduceRight( iteratee: (value: T, accumulator: U) => U, accumulator: U ): (collection: Array | { [id: any]: T }) => U; reduceRight( iteratee: (value: T, accumulator: U) => U, accumulator: U, collection: Array | { [id: any]: T } ): U; reject( predicate: Predicate | OPredicate ): (collection: Array | { [id: any]: T }) => Array; reject( predicate: Predicate | OPredicate, collection: Array | { [id: any]: T } ): Array; sample(collection: Array | { [id: any]: T }): T; sampleSize( n: number ): (collection: Array | { [id: any]: T }) => Array; sampleSize(n: number, collection: Array | { [id: any]: T }): Array; shuffle(collection: Array | { [id: any]: T }): Array; size(collection: Array | Object | string): number; some( predicate: Predicate | OPredicate ): (collection: Array | { [id: any]: T }) => boolean; some( predicate: Predicate | OPredicate, collection: Array | { [id: any]: T } ): boolean; any( predicate: Predicate | OPredicate ): (collection: Array | { [id: any]: T }) => boolean; any( predicate: Predicate | OPredicate, collection: Array | { [id: any]: T } ): boolean; sortBy( iteratees: | $ReadOnlyArray | OIteratee> | Iteratee | OIteratee ): (collection: $ReadOnlyArray | { [id: any]: T }) => Array; sortBy( iteratees: | $ReadOnlyArray | OIteratee> | Iteratee | OIteratee, collection: $ReadOnlyArray | { [id: any]: T }, ): Array; // Date now(): number; // Function after(fn: Function): (n: number) => Function; after(fn: Function, n: number): Function; ary(func: Function): Function; nAry(n: number): (func: Function) => Function; nAry(n: number, func: Function): Function; before(fn: Function): (n: number) => Function; before(fn: Function, n: number): Function; bind(func: Function): (thisArg: any) => Function; bind(func: Function, thisArg: any): Function; bindKey(obj: Object): (key: string) => Function; bindKey(obj: Object, key: string): Function; curry: Curry; curryN(arity: number): (func: Function) => Function; curryN(arity: number, func: Function): Function; curryRight(func: Function): Function; curryRightN(arity: number): (func: Function) => Function; curryRightN(arity: number, func: Function): Function; debounce(wait: number): (func: F) => F; debounce(wait: number, func: F): F; defer(func: Function): TimeoutID; delay(wait: number): (func: Function) => TimeoutID; delay(wait: number, func: Function): TimeoutID; flip(func: Function): Function; memoize(func: F): F; negate(predicate: Function): Function; complement(predicate: Function): Function; once(func: Function): Function; overArgs(func: Function): (transforms: Array) => Function; overArgs(func: Function, transforms: Array): Function; useWith(func: Function): (transforms: Array) => Function; useWith(func: Function, transforms: Array): Function; partial(func: Function): (partials: any[]) => Function; partial(func: Function, partials: any[]): Function; partialRight(func: Function): (partials: Array) => Function; partialRight(func: Function, partials: Array): Function; rearg(indexes: Array): (func: Function) => Function; rearg(indexes: Array, func: Function): Function; rest(func: Function): Function; unapply(func: Function): Function; restFrom(start: number): (func: Function) => Function; restFrom(start: number, func: Function): Function; spread(func: Function): Function; apply(func: Function): Function; spreadFrom(start: number): (func: Function) => Function; spreadFrom(start: number, func: Function): Function; throttle(wait: number): (func: Function) => Function; throttle(wait: number, func: Function): Function; unary(func: Function): Function; wrap(wrapper: Function): (value: any) => Function; wrap(wrapper: Function, value: any): Function; // Lang castArray(value: *): any[]; clone(value: T): T; cloneDeep(value: T): T; cloneDeepWith( customizer: (value: T, key: number | string, object: T, stack: any) => U ): (value: T) => U; cloneDeepWith( customizer: (value: T, key: number | string, object: T, stack: any) => U, value: T ): U; cloneWith( customizer: (value: T, key: number | string, object: T, stack: any) => U ): (value: T) => U; cloneWith( customizer: (value: T, key: number | string, object: T, stack: any) => U, value: T ): U; conformsTo( predicates: T & { [key: string]: (x: any) => boolean } ): (source: T) => boolean; conformsTo( predicates: T & { [key: string]: (x: any) => boolean }, source: T ): boolean; where( predicates: T & { [key: string]: (x: any) => boolean } ): (source: T) => boolean; where( predicates: T & { [key: string]: (x: any) => boolean }, source: T ): boolean; conforms( predicates: T & { [key: string]: (x: any) => boolean } ): (source: T) => boolean; conforms( predicates: T & { [key: string]: (x: any) => boolean }, source: T ): boolean; eq(value: any): (other: any) => boolean; eq(value: any, other: any): boolean; identical(value: any): (other: any) => boolean; identical(value: any, other: any): boolean; gt(value: any): (other: any) => boolean; gt(value: any, other: any): boolean; gte(value: any): (other: any) => boolean; gte(value: any, other: any): boolean; isArguments(value: any): boolean; isArray(value: any): boolean; isArrayBuffer(value: any): boolean; isArrayLike(value: any): boolean; isArrayLikeObject(value: any): boolean; isBoolean(value: any): boolean; isBuffer(value: any): boolean; isDate(value: any): boolean; isElement(value: any): boolean; isEmpty(value: any): boolean; isEqual(value: any): (other: any) => boolean; isEqual(value: any, other: any): boolean; equals(value: any): (other: any) => boolean; equals(value: any, other: any): boolean; isEqualWith( customizer: ( objValue: any, otherValue: any, key: number | string, object: T, other: U, stack: any ) => boolean | void ): ((value: T) => (other: U) => boolean) & ((value: T, other: U) => boolean); isEqualWith( customizer: ( objValue: any, otherValue: any, key: number | string, object: T, other: U, stack: any ) => boolean | void, value: T ): (other: U) => boolean; isEqualWith( customizer: ( objValue: any, otherValue: any, key: number | string, object: T, other: U, stack: any ) => boolean | void, value: T, other: U ): boolean; isError(value: any): boolean; isFinite(value: any): boolean; isFunction(value: Function): true; isFunction(value: number | string | void | null | Object): false; isInteger(value: any): boolean; isLength(value: any): boolean; isMap(value: any): boolean; isMatch(source: Object): (object: Object) => boolean; isMatch(source: Object, object: Object): boolean; whereEq(source: Object): (object: Object) => boolean; whereEq(source: Object, object: Object): boolean; isMatchWith( customizer: ( objValue: any, srcValue: any, key: number | string, object: T, source: U ) => boolean | void ): ((source: U) => (object: T) => boolean) & ((source: U, object: T) => boolean); isMatchWith( customizer: ( objValue: any, srcValue: any, key: number | string, object: T, source: U ) => boolean | void, source: U ): (object: T) => boolean; isMatchWith( customizer: ( objValue: any, srcValue: any, key: number | string, object: T, source: U ) => boolean | void, source: U, object: T ): boolean; isNaN(value: any): boolean; isNative(value: any): boolean; isNil(value: any): boolean; isNull(value: any): boolean; isNumber(value: any): boolean; isObject(value: any): boolean; isObjectLike(value: any): boolean; isPlainObject(value: any): boolean; isRegExp(value: any): boolean; isSafeInteger(value: any): boolean; isSet(value: any): boolean; isString(value: string): true; isString( value: number | boolean | Function | void | null | Object | Array ): false; isSymbol(value: any): boolean; isTypedArray(value: any): boolean; isUndefined(value: any): boolean; isWeakMap(value: any): boolean; isWeakSet(value: any): boolean; lt(value: any): (other: any) => boolean; lt(value: any, other: any): boolean; lte(value: any): (other: any) => boolean; lte(value: any, other: any): boolean; toArray(value: any): Array; toFinite(value: any): number; toInteger(value: any): number; toLength(value: any): number; toNumber(value: any): number; toPlainObject(value: any): Object; toSafeInteger(value: any): number; toString(value: any): string; // Math add(augend: number): (addend: number) => number; add(augend: number, addend: number): number; ceil(number: number): number; divide(dividend: number): (divisor: number) => number; divide(dividend: number, divisor: number): number; floor(number: number): number; max(array: Array): T; maxBy(iteratee: Iteratee): (array: Array) => T; maxBy(iteratee: Iteratee, array: Array): T; mean(array: Array<*>): number; meanBy(iteratee: Iteratee): (array: Array) => number; meanBy(iteratee: Iteratee, array: Array): number; min(array: Array): T; minBy(iteratee: Iteratee): (array: Array) => T; minBy(iteratee: Iteratee, array: Array): T; multiply(multiplier: number): (multiplicand: number) => number; multiply(multiplier: number, multiplicand: number): number; round(number: number): number; subtract(minuend: number): (subtrahend: number) => number; subtract(minuend: number, subtrahend: number): number; sum(array: Array<*>): number; sumBy(iteratee: Iteratee): (array: Array) => number; sumBy(iteratee: Iteratee, array: Array): number; // number clamp( lower: number ): ((upper: number) => (number: number) => number) & ((upper: number, number: number) => number); clamp(lower: number, upper: number): (number: number) => number; clamp(lower: number, upper: number, number: number): number; inRange( start: number ): ((end: number) => (number: number) => boolean) & ((end: number, number: number) => boolean); inRange(start: number, end: number): (number: number) => boolean; inRange(start: number, end: number, number: number): boolean; random(lower: number): (upper: number) => number; random(lower: number, upper: number): number; // Object assign(object: Object): (source: Object) => Object; assign(object: Object, source: Object): Object; assignAll(objects: Array): Object; assignInAll(objects: Array): Object; extendAll(objects: Array): Object; assignIn(a: A): (b: B) => A & B; assignIn(a: A, b: B): A & B; assignInWith( customizer: ( objValue: any, srcValue: any, key: string, object: T, source: A ) => any | void ): ((object: T) => (s1: A) => Object) & ((object: T, s1: A) => Object); assignInWith( customizer: ( objValue: any, srcValue: any, key: string, object: T, source: A ) => any | void, object: T ): (s1: A) => Object; assignInWith( customizer: ( objValue: any, srcValue: any, key: string, object: T, source: A ) => any | void, object: T, s1: A ): Object; assignWith( customizer: ( objValue: any, srcValue: any, key: string, object: T, source: A ) => any | void ): ((object: T) => (s1: A) => Object) & ((object: T, s1: A) => Object); assignWith( customizer: ( objValue: any, srcValue: any, key: string, object: T, source: A ) => any | void, object: T ): (s1: A) => Object; assignWith( customizer: ( objValue: any, srcValue: any, key: string, object: T, source: A ) => any | void, object: T, s1: A ): Object; assignInAllWith( customizer: ( objValue: any, srcValue: any, key: string, object: Object, source: Object ) => any | void ): (objects: Array) => Object; assignInAllWith( customizer: ( objValue: any, srcValue: any, key: string, object: Object, source: Object ) => any | void, objects: Array ): Object; extendAllWith( customizer: ( objValue: any, srcValue: any, key: string, object: Object, source: Object ) => any | void ): (objects: Array) => Object; extendAllWith( customizer: ( objValue: any, srcValue: any, key: string, object: Object, source: Object ) => any | void, objects: Array ): Object; assignAllWith( customizer: ( objValue: any, srcValue: any, key: string, object: Object, source: Object ) => any | void ): (objects: Array) => Object; assignAllWith( customizer: ( objValue: any, srcValue: any, key: string, object: Object, source: Object ) => any | void, objects: Array ): Object; at(paths: Array): (object: Object) => Array; at(paths: Array, object: Object): Array; props(paths: Array): (object: Object) => Array; props(paths: Array, object: Object): Array; paths(paths: Array): (object: Object) => Array; paths(paths: Array, object: Object): Array; create(prototype: T): $Supertype; defaults(source: Object): (object: Object) => Object; defaults(source: Object, object: Object): Object; defaultsAll(objects: Array): Object; defaultsDeep(source: Object): (object: Object) => Object; defaultsDeep(source: Object, object: Object): Object; defaultsDeepAll(objects: Array): Object; // alias for _.toPairs entries(object: Object): Array<[string, any]>; // alias for _.toPairsIn entriesIn(object: Object): Array<[string, any]>; // alias for _.assignIn extend(a: A): (b: B) => A & B; extend(a: A, b: B): A & B; // alias for _.assignInWith extendWith( customizer: ( objValue: any, srcValue: any, key: string, object: T, source: A ) => any | void ): ((object: T) => (s1: A) => Object) & ((object: T, s1: A) => Object); extendWith( customizer: ( objValue: any, srcValue: any, key: string, object: T, source: A ) => any | void, object: T ): (s1: A) => Object; extendWith( customizer: ( objValue: any, srcValue: any, key: string, object: T, source: A ) => any | void, object: T, s1: A ): Object; findKey( predicate: OPredicate ): (object: T) => string | void; findKey( predicate: OPredicate, object: T ): string | void; findLastKey( predicate: OPredicate ): (object: T) => string | void; findLastKey( predicate: OPredicate, object: T ): string | void; forIn(iteratee: OIteratee<*>): (object: Object) => Object; forIn(iteratee: OIteratee<*>, object: Object): Object; forInRight(iteratee: OIteratee<*>): (object: Object) => Object; forInRight(iteratee: OIteratee<*>, object: Object): Object; forOwn(iteratee: OIteratee<*>): (object: Object) => Object; forOwn(iteratee: OIteratee<*>, object: Object): Object; forOwnRight(iteratee: OIteratee<*>): (object: Object) => Object; forOwnRight(iteratee: OIteratee<*>, object: Object): Object; functions(object: Object): Array; functionsIn(object: Object): Array; get(path: Array | string): (object: Object | Array) => any; get(path: Array | string, object: Object | Array): any; prop(path: Array | string): (object: Object | Array) => any; prop(path: Array | string, object: Object | Array): any; path(path: Array | string): (object: Object | Array) => any; path(path: Array | string, object: Object | Array): any; getOr( defaultValue: any ): (( path: Array | string ) => (object: Object | Array) => any) & ((path: Array | string, object: Object | Array) => any); getOr( defaultValue: any, path: Array | string ): (object: Object | Array) => any; getOr( defaultValue: any, path: Array | string, object: Object | Array ): any; propOr( defaultValue: any ): (( path: Array | string ) => (object: Object | Array) => any) & ((path: Array | string, object: Object | Array) => any); propOr( defaultValue: any, path: Array | string ): (object: Object | Array) => any; propOr( defaultValue: any, path: Array | string, object: Object | Array ): any; pathOr( defaultValue: any ): (( path: Array | string ) => (object: Object | Array) => any) & ((path: Array | string, object: Object | Array) => any); pathOr( defaultValue: any, path: Array | string ): (object: Object | Array) => any; pathOr( defaultValue: any, path: Array | string, object: Object | Array ): any; has(path: Array | string): (object: Object) => boolean; has(path: Array | string, object: Object): boolean; hasIn(path: Array | string): (object: Object) => boolean; hasIn(path: Array | string, object: Object): boolean; invert(object: Object): Object; invertObj(object: Object): Object; invertBy(iteratee: Function): (object: Object) => Object; invertBy(iteratee: Function, object: Object): Object; invoke(path: Array | string): (object: Object) => any; invoke(path: Array | string, object: Object): any; invokeArgs( path: Array | string ): ((object: Object) => (args: Array) => any) & ((object: Object, args: Array) => any); invokeArgs( path: Array | string, object: Object ): (args: Array) => any; invokeArgs( path: Array | string, object: Object, args: Array ): any; keys(object: { [key: K]: any }): Array; keys(object: Object): Array; keysIn(object: Object): Array; mapKeys(iteratee: OIteratee<*>): (object: Object) => Object; mapKeys(iteratee: OIteratee<*>, object: Object): Object; mapValues(iteratee: OIteratee<*>): (object: Object) => Object; mapValues(iteratee: OIteratee<*>, object: Object): Object; merge(object: Object): (source: Object) => Object; merge(object: Object, source: Object): Object; mergeAll(objects: Array): Object; mergeWith( customizer: ( objValue: any, srcValue: any, key: string, object: T, source: A | B ) => any | void ): ((object: T) => (s1: A) => Object) & ((object: T, s1: A) => Object); mergeWith( customizer: ( objValue: any, srcValue: any, key: string, object: T, source: A | B ) => any | void, object: T ): (s1: A) => Object; mergeWith( customizer: ( objValue: any, srcValue: any, key: string, object: T, source: A | B ) => any | void, object: T, s1: A ): Object; mergeAllWith( customizer: ( objValue: any, srcValue: any, key: string, object: Object, source: Object ) => any | void ): (objects: Array) => Object; mergeAllWith( customizer: ( objValue: any, srcValue: any, key: string, object: Object, source: Object ) => any | void, objects: Array ): Object; omit(props: Array): (object: Object) => Object; omit(props: Array, object: Object): Object; omitAll(props: Array): (object: Object) => Object; omitAll(props: Array, object: Object): Object; omitBy( predicate: OPredicate ): (object: T) => Object; omitBy(predicate: OPredicate, object: T): Object; pick(props: Array): (object: Object) => Object; pick(props: Array, object: Object): Object; pickAll(props: Array): (object: Object) => Object; pickAll(props: Array, object: Object): Object; pickBy( predicate: OPredicate ): (object: T) => Object; pickBy(predicate: OPredicate, object: T): Object; result(path: Array | string): (object: Object) => any; result(path: Array | string, object: Object): any; set( path: Array | string ): ((value: any) => (object: Object) => Object) & ((value: any, object: Object) => Object); set(path: Array | string, value: any): (object: Object) => Object; set(path: Array | string, value: any, object: Object): Object; assoc( path: Array | string ): ((value: any) => (object: Object) => Object) & ((value: any, object: Object) => Object); assoc(path: Array | string, value: any): (object: Object) => Object; assoc(path: Array | string, value: any, object: Object): Object; assocPath( path: Array | string ): ((value: any) => (object: Object) => Object) & ((value: any, object: Object) => Object); assocPath( path: Array | string, value: any ): (object: Object) => Object; assocPath(path: Array | string, value: any, object: Object): Object; setWith( customizer: (nsValue: any, key: string, nsObject: T) => any ): (( path: Array | string ) => ((value: any) => (object: T) => Object) & ((value: any, object: T) => Object)) & ((path: Array | string, value: any) => (object: T) => Object) & ((path: Array | string, value: any, object: T) => Object); setWith( customizer: (nsValue: any, key: string, nsObject: T) => any, path: Array | string ): ((value: any) => (object: T) => Object) & ((value: any, object: T) => Object); setWith( customizer: (nsValue: any, key: string, nsObject: T) => any, path: Array | string, value: any ): (object: T) => Object; setWith( customizer: (nsValue: any, key: string, nsObject: T) => any, path: Array | string, value: any, object: T ): Object; toPairs(object: Object | Array<*>): Array<[string, any]>; toPairsIn(object: Object): Array<[string, any]>; transform( iteratee: OIteratee<*> ): (( accumulator: any ) => (collection: Object | $ReadOnlyArray) => any) & ((accumulator: any, collection: Object | $ReadOnlyArray) => any); transform( iteratee: OIteratee<*>, accumulator: any ): (collection: Object | $ReadOnlyArray) => any; transform( iteratee: OIteratee<*>, accumulator: any, collection: Object | $ReadOnlyArray ): any; unset(path: Array | string): (object: Object) => Object; unset(path: Array | string, object: Object): Object; dissoc(path: Array | string): (object: Object) => Object; dissoc(path: Array | string, object: Object): Object; dissocPath(path: Array | string): (object: Object) => Object; dissocPath(path: Array | string, object: Object): Object; update( path: string[] | string ): ((updater: Function) => (object: Object) => Object) & ((updater: Function, object: Object) => Object); update( path: string[] | string, updater: Function ): (object: Object) => Object; update(path: string[] | string, updater: Function, object: Object): Object; updateWith( customizer: Function ): (( path: string[] | string ) => ((updater: Function) => (object: Object) => Object) & ((updater: Function, object: Object) => Object)) & (( path: string[] | string, updater: Function ) => (object: Object) => Object) & ((path: string[] | string, updater: Function, object: Object) => Object); updateWith( customizer: Function, path: string[] | string ): ((updater: Function) => (object: Object) => Object) & ((updater: Function, object: Object) => Object); updateWith( customizer: Function, path: string[] | string, updater: Function ): (object: Object) => Object; updateWith( customizer: Function, path: string[] | string, updater: Function, object: Object ): Object; values(object: Object): Array; valuesIn(object: Object): Array; tap(interceptor: (value: T) => any): (value: T) => T; tap(interceptor: (value: T) => any, value: T): T; thru(interceptor: (value: T1) => T2): (value: T1) => T2; thru(interceptor: (value: T1) => T2, value: T1): T2; // String camelCase(string: string): string; capitalize(string: string): string; deburr(string: string): string; endsWith(target: string): (string: string) => boolean; endsWith(target: string, string: string): boolean; escape(string: string): string; escapeRegExp(string: string): string; kebabCase(string: string): string; lowerCase(string: string): string; lowerFirst(string: string): string; pad(length: number): (string: string) => string; pad(length: number, string: string): string; padChars( chars: string ): ((length: number) => (string: string) => string) & ((length: number, string: string) => string); padChars(chars: string, length: number): (string: string) => string; padChars(chars: string, length: number, string: string): string; padEnd(length: number): (string: string) => string; padEnd(length: number, string: string): string; padCharsEnd( chars: string ): ((length: number) => (string: string) => string) & ((length: number, string: string) => string); padCharsEnd(chars: string, length: number): (string: string) => string; padCharsEnd(chars: string, length: number, string: string): string; padStart(length: number): (string: string) => string; padStart(length: number, string: string): string; padCharsStart( chars: string ): ((length: number) => (string: string) => string) & ((length: number, string: string) => string); padCharsStart(chars: string, length: number): (string: string) => string; padCharsStart(chars: string, length: number, string: string): string; parseInt(radix: number): (string: string) => number; parseInt(radix: number, string: string): number; repeat(n: number): (string: string) => string; repeat(n: number, string: string): string; replace( pattern: RegExp | string ): (( replacement: ((string: string) => string) | string ) => (string: string) => string) & (( replacement: ((string: string) => string) | string, string: string ) => string); replace( pattern: RegExp | string, replacement: ((string: string) => string) | string ): (string: string) => string; replace( pattern: RegExp | string, replacement: ((string: string) => string) | string, string: string ): string; snakeCase(string: string): string; split(separator: RegExp | string): (string: string) => Array; split(separator: RegExp | string, string: string): Array; startCase(string: string): string; startsWith(target: string): (string: string) => boolean; startsWith(target: string, string: string): boolean; template(string: string): Function; toLower(string: string): string; toUpper(string: string): string; trim(string: string): string; trimChars(chars: string): (string: string) => string; trimChars(chars: string, string: string): string; trimEnd(string: string): string; trimCharsEnd(chars: string): (string: string) => string; trimCharsEnd(chars: string, string: string): string; trimStart(string: string): string; trimCharsStart(chars: string): (string: string) => string; trimCharsStart(chars: string, string: string): string; truncate(options: TruncateOptions): (string: string) => string; truncate(options: TruncateOptions, string: string): string; unescape(string: string): string; upperCase(string: string): string; upperFirst(string: string): string; words(string: string): Array; // Util attempt(func: Function): any; bindAll(methodNames: Array): (object: Object) => Object; bindAll(methodNames: Array, object: Object): Object; cond(pairs: NestedArray): Function; constant(value: T): () => T; always(value: T): () => T; defaultTo( defaultValue: T2 ): (value: T1) => T1; defaultTo( defaultValue: T2, value: T1 ): T1; // NaN is a number instead of its own type, otherwise it would behave like null/void defaultTo(defaultValue: T2): (value: T1) => T1 | T2; defaultTo(defaultValue: T2, value: T1): T1 | T2; defaultTo(defaultValue: T2): (value: T1) => T2; defaultTo(defaultValue: T2, value: T1): T2; flow: ($ComposeReverse & (funcs: Array) => Function); pipe: ($ComposeReverse & (funcs: Array) => Function); flowRight: ($Compose & (funcs: Array) => Function); compose: ($Compose & (funcs: Array) => Function); compose(funcs: Array): Function; identity(value: T): T; iteratee(func: any): Function; matches(source: Object): (object: Object) => boolean; matches(source: Object, object: Object): boolean; matchesProperty(path: Array | string): (srcValue: any) => Function; matchesProperty(path: Array | string, srcValue: any): Function; propEq(path: Array | string): (srcValue: any) => Function; propEq(path: Array | string, srcValue: any): Function; pathEq(path: Array | string): (srcValue: any) => Function; pathEq(path: Array | string, srcValue: any): Function; method(path: Array | string): Function; methodOf(object: Object): Function; mixin( object: T ): ((source: Object) => (options: { chain: boolean }) => T) & ((source: Object, options: { chain: boolean }) => T); mixin( object: T, source: Object ): (options: { chain: boolean }) => T; mixin( object: T, source: Object, options: { chain: boolean } ): T; noConflict(): Lodash; noop(...args: Array): void; nthArg(n: number): Function; over(iteratees: Array): Function; juxt(iteratees: Array): Function; overEvery(predicates: Array): Function; allPass(predicates: Array): Function; overSome(predicates: Array): Function; anyPass(predicates: Array): Function; property( path: Array | string ): (object: Object | Array) => any; property(path: Array | string, object: Object | Array): any; propertyOf(object: Object): (path: Array | string) => Function; propertyOf(object: Object, path: Array | string): Function; range(start: number): (end: number) => Array; range(start: number, end: number): Array; rangeStep( step: number ): ((start: number) => (end: number) => Array) & ((start: number, end: number) => Array); rangeStep(step: number, start: number): (end: number) => Array; rangeStep(step: number, start: number, end: number): Array; rangeRight(start: number): (end: number) => Array; rangeRight(start: number, end: number): Array; rangeStepRight( step: number ): ((start: number) => (end: number) => Array) & ((start: number, end: number) => Array); rangeStepRight(step: number, start: number): (end: number) => Array; rangeStepRight(step: number, start: number, end: number): Array; runInContext(context: Object): Function; stubArray(): Array<*>; stubFalse(): false; F(): false; stubObject(): {}; stubString(): ""; stubTrue(): true; T(): true; times(iteratee: (i: number) => T): (n: number) => Array; times(iteratee: (i: number) => T, n: number): Array; toPath(value: any): Array; uniqueId(prefix: string): string; __: any; placeholder: any; convert(options: { cap?: boolean, curry?: boolean, fixed?: boolean, immutable?: boolean, rearg?: boolean }): void; // Properties VERSION: string; templateSettings: TemplateSettings; } declare module.exports: Lodash; } declare module "lodash/chunk" { declare module.exports: $PropertyType<$Exports<"lodash">, "chunk">; } declare module "lodash/compact" { declare module.exports: $PropertyType<$Exports<"lodash">, "compact">; } declare module "lodash/concat" { declare module.exports: $PropertyType<$Exports<"lodash">, "concat">; } declare module "lodash/difference" { declare module.exports: $PropertyType<$Exports<"lodash">, "difference">; } declare module "lodash/differenceBy" { declare module.exports: $PropertyType<$Exports<"lodash">, "differenceBy">; } declare module "lodash/differenceWith" { declare module.exports: $PropertyType<$Exports<"lodash">, "differenceWith">; } declare module "lodash/drop" { declare module.exports: $PropertyType<$Exports<"lodash">, "drop">; } declare module "lodash/dropRight" { declare module.exports: $PropertyType<$Exports<"lodash">, "dropRight">; } declare module "lodash/dropRightWhile" { declare module.exports: $PropertyType<$Exports<"lodash">, "dropRightWhile">; } declare module "lodash/dropWhile" { declare module.exports: $PropertyType<$Exports<"lodash">, "dropWhile">; } declare module "lodash/fill" { declare module.exports: $PropertyType<$Exports<"lodash">, "fill">; } declare module "lodash/findIndex" { declare module.exports: $PropertyType<$Exports<"lodash">, "findIndex">; } declare module "lodash/findLastIndex" { declare module.exports: $PropertyType<$Exports<"lodash">, "findLastIndex">; } declare module "lodash/first" { declare module.exports: $PropertyType<$Exports<"lodash">, "first">; } declare module "lodash/flatten" { declare module.exports: $PropertyType<$Exports<"lodash">, "flatten">; } declare module "lodash/flattenDeep" { declare module.exports: $PropertyType<$Exports<"lodash">, "flattenDeep">; } declare module "lodash/flattenDepth" { declare module.exports: $PropertyType<$Exports<"lodash">, "flattenDepth">; } declare module "lodash/fromPairs" { declare module.exports: $PropertyType<$Exports<"lodash">, "fromPairs">; } declare module "lodash/head" { declare module.exports: $PropertyType<$Exports<"lodash">, "head">; } declare module "lodash/indexOf" { declare module.exports: $PropertyType<$Exports<"lodash">, "indexOf">; } declare module "lodash/initial" { declare module.exports: $PropertyType<$Exports<"lodash">, "initial">; } declare module "lodash/intersection" { declare module.exports: $PropertyType<$Exports<"lodash">, "intersection">; } declare module "lodash/intersectionBy" { declare module.exports: $PropertyType<$Exports<"lodash">, "intersectionBy">; } declare module "lodash/intersectionWith" { declare module.exports: $PropertyType<$Exports<"lodash">, "intersectionWith">; } declare module "lodash/join" { declare module.exports: $PropertyType<$Exports<"lodash">, "join">; } declare module "lodash/last" { declare module.exports: $PropertyType<$Exports<"lodash">, "last">; } declare module "lodash/lastIndexOf" { declare module.exports: $PropertyType<$Exports<"lodash">, "lastIndexOf">; } declare module "lodash/nth" { declare module.exports: $PropertyType<$Exports<"lodash">, "nth">; } declare module "lodash/pull" { declare module.exports: $PropertyType<$Exports<"lodash">, "pull">; } declare module "lodash/pullAll" { declare module.exports: $PropertyType<$Exports<"lodash">, "pullAll">; } declare module "lodash/pullAllBy" { declare module.exports: $PropertyType<$Exports<"lodash">, "pullAllBy">; } declare module "lodash/pullAllWith" { declare module.exports: $PropertyType<$Exports<"lodash">, "pullAllWith">; } declare module "lodash/pullAt" { declare module.exports: $PropertyType<$Exports<"lodash">, "pullAt">; } declare module "lodash/remove" { declare module.exports: $PropertyType<$Exports<"lodash">, "remove">; } declare module "lodash/reverse" { declare module.exports: $PropertyType<$Exports<"lodash">, "reverse">; } declare module "lodash/slice" { declare module.exports: $PropertyType<$Exports<"lodash">, "slice">; } declare module "lodash/sortedIndex" { declare module.exports: $PropertyType<$Exports<"lodash">, "sortedIndex">; } declare module "lodash/sortedIndexBy" { declare module.exports: $PropertyType<$Exports<"lodash">, "sortedIndexBy">; } declare module "lodash/sortedIndexOf" { declare module.exports: $PropertyType<$Exports<"lodash">, "sortedIndexOf">; } declare module "lodash/sortedLastIndex" { declare module.exports: $PropertyType<$Exports<"lodash">, "sortedLastIndex">; } declare module "lodash/sortedLastIndexBy" { declare module.exports: $PropertyType< $Exports<"lodash">, "sortedLastIndexBy" >; } declare module "lodash/sortedLastIndexOf" { declare module.exports: $PropertyType< $Exports<"lodash">, "sortedLastIndexOf" >; } declare module "lodash/sortedUniq" { declare module.exports: $PropertyType<$Exports<"lodash">, "sortedUniq">; } declare module "lodash/sortedUniqBy" { declare module.exports: $PropertyType<$Exports<"lodash">, "sortedUniqBy">; } declare module "lodash/tail" { declare module.exports: $PropertyType<$Exports<"lodash">, "tail">; } declare module "lodash/take" { declare module.exports: $PropertyType<$Exports<"lodash">, "take">; } declare module "lodash/takeRight" { declare module.exports: $PropertyType<$Exports<"lodash">, "takeRight">; } declare module "lodash/takeRightWhile" { declare module.exports: $PropertyType<$Exports<"lodash">, "takeRightWhile">; } declare module "lodash/takeWhile" { declare module.exports: $PropertyType<$Exports<"lodash">, "takeWhile">; } declare module "lodash/union" { declare module.exports: $PropertyType<$Exports<"lodash">, "union">; } declare module "lodash/unionBy" { declare module.exports: $PropertyType<$Exports<"lodash">, "unionBy">; } declare module "lodash/unionWith" { declare module.exports: $PropertyType<$Exports<"lodash">, "unionWith">; } declare module "lodash/uniq" { declare module.exports: $PropertyType<$Exports<"lodash">, "uniq">; } declare module "lodash/uniqBy" { declare module.exports: $PropertyType<$Exports<"lodash">, "uniqBy">; } declare module "lodash/uniqWith" { declare module.exports: $PropertyType<$Exports<"lodash">, "uniqWith">; } declare module "lodash/unzip" { declare module.exports: $PropertyType<$Exports<"lodash">, "unzip">; } declare module "lodash/unzipWith" { declare module.exports: $PropertyType<$Exports<"lodash">, "unzipWith">; } declare module "lodash/without" { declare module.exports: $PropertyType<$Exports<"lodash">, "without">; } declare module "lodash/xor" { declare module.exports: $PropertyType<$Exports<"lodash">, "xor">; } declare module "lodash/xorBy" { declare module.exports: $PropertyType<$Exports<"lodash">, "xorBy">; } declare module "lodash/xorWith" { declare module.exports: $PropertyType<$Exports<"lodash">, "xorWith">; } declare module "lodash/zip" { declare module.exports: $PropertyType<$Exports<"lodash">, "zip">; } declare module "lodash/zipObject" { declare module.exports: $PropertyType<$Exports<"lodash">, "zipObject">; } declare module "lodash/zipObjectDeep" { declare module.exports: $PropertyType<$Exports<"lodash">, "zipObjectDeep">; } declare module "lodash/zipWith" { declare module.exports: $PropertyType<$Exports<"lodash">, "zipWith">; } declare module "lodash/countBy" { declare module.exports: $PropertyType<$Exports<"lodash">, "countBy">; } declare module "lodash/each" { declare module.exports: $PropertyType<$Exports<"lodash">, "each">; } declare module "lodash/eachRight" { declare module.exports: $PropertyType<$Exports<"lodash">, "eachRight">; } declare module "lodash/every" { declare module.exports: $PropertyType<$Exports<"lodash">, "every">; } declare module "lodash/filter" { declare module.exports: $PropertyType<$Exports<"lodash">, "filter">; } declare module "lodash/find" { declare module.exports: $PropertyType<$Exports<"lodash">, "find">; } declare module "lodash/findLast" { declare module.exports: $PropertyType<$Exports<"lodash">, "findLast">; } declare module "lodash/flatMap" { declare module.exports: $PropertyType<$Exports<"lodash">, "flatMap">; } declare module "lodash/flatMapDeep" { declare module.exports: $PropertyType<$Exports<"lodash">, "flatMapDeep">; } declare module "lodash/flatMapDepth" { declare module.exports: $PropertyType<$Exports<"lodash">, "flatMapDepth">; } declare module "lodash/forEach" { declare module.exports: $PropertyType<$Exports<"lodash">, "forEach">; } declare module "lodash/forEachRight" { declare module.exports: $PropertyType<$Exports<"lodash">, "forEachRight">; } declare module "lodash/groupBy" { declare module.exports: $PropertyType<$Exports<"lodash">, "groupBy">; } declare module "lodash/includes" { declare module.exports: $PropertyType<$Exports<"lodash">, "includes">; } declare module "lodash/invokeMap" { declare module.exports: $PropertyType<$Exports<"lodash">, "invokeMap">; } declare module "lodash/keyBy" { declare module.exports: $PropertyType<$Exports<"lodash">, "keyBy">; } declare module "lodash/map" { declare module.exports: $PropertyType<$Exports<"lodash">, "map">; } declare module "lodash/orderBy" { declare module.exports: $PropertyType<$Exports<"lodash">, "orderBy">; } declare module "lodash/partition" { declare module.exports: $PropertyType<$Exports<"lodash">, "partition">; } declare module "lodash/reduce" { declare module.exports: $PropertyType<$Exports<"lodash">, "reduce">; } declare module "lodash/reduceRight" { declare module.exports: $PropertyType<$Exports<"lodash">, "reduceRight">; } declare module "lodash/reject" { declare module.exports: $PropertyType<$Exports<"lodash">, "reject">; } declare module "lodash/sample" { declare module.exports: $PropertyType<$Exports<"lodash">, "sample">; } declare module "lodash/sampleSize" { declare module.exports: $PropertyType<$Exports<"lodash">, "sampleSize">; } declare module "lodash/shuffle" { declare module.exports: $PropertyType<$Exports<"lodash">, "shuffle">; } declare module "lodash/size" { declare module.exports: $PropertyType<$Exports<"lodash">, "size">; } declare module "lodash/some" { declare module.exports: $PropertyType<$Exports<"lodash">, "some">; } declare module "lodash/sortBy" { declare module.exports: $PropertyType<$Exports<"lodash">, "sortBy">; } declare module "lodash/now" { declare module.exports: $PropertyType<$Exports<"lodash">, "now">; } declare module "lodash/after" { declare module.exports: $PropertyType<$Exports<"lodash">, "after">; } declare module "lodash/ary" { declare module.exports: $PropertyType<$Exports<"lodash">, "ary">; } declare module "lodash/before" { declare module.exports: $PropertyType<$Exports<"lodash">, "before">; } declare module "lodash/bind" { declare module.exports: $PropertyType<$Exports<"lodash">, "bind">; } declare module "lodash/bindKey" { declare module.exports: $PropertyType<$Exports<"lodash">, "bindKey">; } declare module "lodash/curry" { declare module.exports: $PropertyType<$Exports<"lodash">, "curry">; } declare module "lodash/curryRight" { declare module.exports: $PropertyType<$Exports<"lodash">, "curryRight">; } declare module "lodash/debounce" { declare module.exports: $PropertyType<$Exports<"lodash">, "debounce">; } declare module "lodash/defer" { declare module.exports: $PropertyType<$Exports<"lodash">, "defer">; } declare module "lodash/delay" { declare module.exports: $PropertyType<$Exports<"lodash">, "delay">; } declare module "lodash/flip" { declare module.exports: $PropertyType<$Exports<"lodash">, "flip">; } declare module "lodash/memoize" { declare module.exports: $PropertyType<$Exports<"lodash">, "memoize">; } declare module "lodash/negate" { declare module.exports: $PropertyType<$Exports<"lodash">, "negate">; } declare module "lodash/once" { declare module.exports: $PropertyType<$Exports<"lodash">, "once">; } declare module "lodash/overArgs" { declare module.exports: $PropertyType<$Exports<"lodash">, "overArgs">; } declare module "lodash/partial" { declare module.exports: $PropertyType<$Exports<"lodash">, "partial">; } declare module "lodash/partialRight" { declare module.exports: $PropertyType<$Exports<"lodash">, "partialRight">; } declare module "lodash/rearg" { declare module.exports: $PropertyType<$Exports<"lodash">, "rearg">; } declare module "lodash/rest" { declare module.exports: $PropertyType<$Exports<"lodash">, "rest">; } declare module "lodash/spread" { declare module.exports: $PropertyType<$Exports<"lodash">, "spread">; } declare module "lodash/throttle" { declare module.exports: $PropertyType<$Exports<"lodash">, "throttle">; } declare module "lodash/unary" { declare module.exports: $PropertyType<$Exports<"lodash">, "unary">; } declare module "lodash/wrap" { declare module.exports: $PropertyType<$Exports<"lodash">, "wrap">; } declare module "lodash/castArray" { declare module.exports: $PropertyType<$Exports<"lodash">, "castArray">; } declare module "lodash/clone" { declare module.exports: $PropertyType<$Exports<"lodash">, "clone">; } declare module "lodash/cloneDeep" { declare module.exports: $PropertyType<$Exports<"lodash">, "cloneDeep">; } declare module "lodash/cloneDeepWith" { declare module.exports: $PropertyType<$Exports<"lodash">, "cloneDeepWith">; } declare module "lodash/cloneWith" { declare module.exports: $PropertyType<$Exports<"lodash">, "cloneWith">; } declare module "lodash/conformsTo" { declare module.exports: $PropertyType<$Exports<"lodash">, "conformsTo">; } declare module "lodash/eq" { declare module.exports: $PropertyType<$Exports<"lodash">, "eq">; } declare module "lodash/gt" { declare module.exports: $PropertyType<$Exports<"lodash">, "gt">; } declare module "lodash/gte" { declare module.exports: $PropertyType<$Exports<"lodash">, "gte">; } declare module "lodash/isArguments" { declare module.exports: $PropertyType<$Exports<"lodash">, "isArguments">; } declare module "lodash/isArray" { declare module.exports: $PropertyType<$Exports<"lodash">, "isArray">; } declare module "lodash/isArrayBuffer" { declare module.exports: $PropertyType<$Exports<"lodash">, "isArrayBuffer">; } declare module "lodash/isArrayLike" { declare module.exports: $PropertyType<$Exports<"lodash">, "isArrayLike">; } declare module "lodash/isArrayLikeObject" { declare module.exports: $PropertyType< $Exports<"lodash">, "isArrayLikeObject" >; } declare module "lodash/isBoolean" { declare module.exports: $PropertyType<$Exports<"lodash">, "isBoolean">; } declare module "lodash/isBuffer" { declare module.exports: $PropertyType<$Exports<"lodash">, "isBuffer">; } declare module "lodash/isDate" { declare module.exports: $PropertyType<$Exports<"lodash">, "isDate">; } declare module "lodash/isElement" { declare module.exports: $PropertyType<$Exports<"lodash">, "isElement">; } declare module "lodash/isEmpty" { declare module.exports: $PropertyType<$Exports<"lodash">, "isEmpty">; } declare module "lodash/isEqual" { declare module.exports: $PropertyType<$Exports<"lodash">, "isEqual">; } declare module "lodash/isEqualWith" { declare module.exports: $PropertyType<$Exports<"lodash">, "isEqualWith">; } declare module "lodash/isError" { declare module.exports: $PropertyType<$Exports<"lodash">, "isError">; } declare module "lodash/isFinite" { declare module.exports: $PropertyType<$Exports<"lodash">, "isFinite">; } declare module "lodash/isFunction" { declare module.exports: $PropertyType<$Exports<"lodash">, "isFunction">; } declare module "lodash/isInteger" { declare module.exports: $PropertyType<$Exports<"lodash">, "isInteger">; } declare module "lodash/isLength" { declare module.exports: $PropertyType<$Exports<"lodash">, "isLength">; } declare module "lodash/isMap" { declare module.exports: $PropertyType<$Exports<"lodash">, "isMap">; } declare module "lodash/isMatch" { declare module.exports: $PropertyType<$Exports<"lodash">, "isMatch">; } declare module "lodash/isMatchWith" { declare module.exports: $PropertyType<$Exports<"lodash">, "isMatchWith">; } declare module "lodash/isNaN" { declare module.exports: $PropertyType<$Exports<"lodash">, "isNaN">; } declare module "lodash/isNative" { declare module.exports: $PropertyType<$Exports<"lodash">, "isNative">; } declare module "lodash/isNil" { declare module.exports: $PropertyType<$Exports<"lodash">, "isNil">; } declare module "lodash/isNull" { declare module.exports: $PropertyType<$Exports<"lodash">, "isNull">; } declare module "lodash/isNumber" { declare module.exports: $PropertyType<$Exports<"lodash">, "isNumber">; } declare module "lodash/isObject" { declare module.exports: $PropertyType<$Exports<"lodash">, "isObject">; } declare module "lodash/isObjectLike" { declare module.exports: $PropertyType<$Exports<"lodash">, "isObjectLike">; } declare module "lodash/isPlainObject" { declare module.exports: $PropertyType<$Exports<"lodash">, "isPlainObject">; } declare module "lodash/isRegExp" { declare module.exports: $PropertyType<$Exports<"lodash">, "isRegExp">; } declare module "lodash/isSafeInteger" { declare module.exports: $PropertyType<$Exports<"lodash">, "isSafeInteger">; } declare module "lodash/isSet" { declare module.exports: $PropertyType<$Exports<"lodash">, "isSet">; } declare module "lodash/isString" { declare module.exports: $PropertyType<$Exports<"lodash">, "isString">; } declare module "lodash/isSymbol" { declare module.exports: $PropertyType<$Exports<"lodash">, "isSymbol">; } declare module "lodash/isTypedArray" { declare module.exports: $PropertyType<$Exports<"lodash">, "isTypedArray">; } declare module "lodash/isUndefined" { declare module.exports: $PropertyType<$Exports<"lodash">, "isUndefined">; } declare module "lodash/isWeakMap" { declare module.exports: $PropertyType<$Exports<"lodash">, "isWeakMap">; } declare module "lodash/isWeakSet" { declare module.exports: $PropertyType<$Exports<"lodash">, "isWeakSet">; } declare module "lodash/lt" { declare module.exports: $PropertyType<$Exports<"lodash">, "lt">; } declare module "lodash/lte" { declare module.exports: $PropertyType<$Exports<"lodash">, "lte">; } declare module "lodash/toArray" { declare module.exports: $PropertyType<$Exports<"lodash">, "toArray">; } declare module "lodash/toFinite" { declare module.exports: $PropertyType<$Exports<"lodash">, "toFinite">; } declare module "lodash/toInteger" { declare module.exports: $PropertyType<$Exports<"lodash">, "toInteger">; } declare module "lodash/toLength" { declare module.exports: $PropertyType<$Exports<"lodash">, "toLength">; } declare module "lodash/toNumber" { declare module.exports: $PropertyType<$Exports<"lodash">, "toNumber">; } declare module "lodash/toPlainObject" { declare module.exports: $PropertyType<$Exports<"lodash">, "toPlainObject">; } declare module "lodash/toSafeInteger" { declare module.exports: $PropertyType<$Exports<"lodash">, "toSafeInteger">; } declare module "lodash/toString" { declare module.exports: $PropertyType<$Exports<"lodash">, "toString">; } declare module "lodash/add" { declare module.exports: $PropertyType<$Exports<"lodash">, "add">; } declare module "lodash/ceil" { declare module.exports: $PropertyType<$Exports<"lodash">, "ceil">; } declare module "lodash/divide" { declare module.exports: $PropertyType<$Exports<"lodash">, "divide">; } declare module "lodash/floor" { declare module.exports: $PropertyType<$Exports<"lodash">, "floor">; } declare module "lodash/max" { declare module.exports: $PropertyType<$Exports<"lodash">, "max">; } declare module "lodash/maxBy" { declare module.exports: $PropertyType<$Exports<"lodash">, "maxBy">; } declare module "lodash/mean" { declare module.exports: $PropertyType<$Exports<"lodash">, "mean">; } declare module "lodash/meanBy" { declare module.exports: $PropertyType<$Exports<"lodash">, "meanBy">; } declare module "lodash/min" { declare module.exports: $PropertyType<$Exports<"lodash">, "min">; } declare module "lodash/minBy" { declare module.exports: $PropertyType<$Exports<"lodash">, "minBy">; } declare module "lodash/multiply" { declare module.exports: $PropertyType<$Exports<"lodash">, "multiply">; } declare module "lodash/round" { declare module.exports: $PropertyType<$Exports<"lodash">, "round">; } declare module "lodash/subtract" { declare module.exports: $PropertyType<$Exports<"lodash">, "subtract">; } declare module "lodash/sum" { declare module.exports: $PropertyType<$Exports<"lodash">, "sum">; } declare module "lodash/sumBy" { declare module.exports: $PropertyType<$Exports<"lodash">, "sumBy">; } declare module "lodash/clamp" { declare module.exports: $PropertyType<$Exports<"lodash">, "clamp">; } declare module "lodash/inRange" { declare module.exports: $PropertyType<$Exports<"lodash">, "inRange">; } declare module "lodash/random" { declare module.exports: $PropertyType<$Exports<"lodash">, "random">; } declare module "lodash/assign" { declare module.exports: $PropertyType<$Exports<"lodash">, "assign">; } declare module "lodash/assignIn" { declare module.exports: $PropertyType<$Exports<"lodash">, "assignIn">; } declare module "lodash/assignInWith" { declare module.exports: $PropertyType<$Exports<"lodash">, "assignInWith">; } declare module "lodash/assignWith" { declare module.exports: $PropertyType<$Exports<"lodash">, "assignWith">; } declare module "lodash/at" { declare module.exports: $PropertyType<$Exports<"lodash">, "at">; } declare module "lodash/create" { declare module.exports: $PropertyType<$Exports<"lodash">, "create">; } declare module "lodash/defaults" { declare module.exports: $PropertyType<$Exports<"lodash">, "defaults">; } declare module "lodash/defaultsDeep" { declare module.exports: $PropertyType<$Exports<"lodash">, "defaultsDeep">; } declare module "lodash/entries" { declare module.exports: $PropertyType<$Exports<"lodash">, "entries">; } declare module "lodash/entriesIn" { declare module.exports: $PropertyType<$Exports<"lodash">, "entriesIn">; } declare module "lodash/extend" { declare module.exports: $PropertyType<$Exports<"lodash">, "extend">; } declare module "lodash/extendWith" { declare module.exports: $PropertyType<$Exports<"lodash">, "extendWith">; } declare module "lodash/findKey" { declare module.exports: $PropertyType<$Exports<"lodash">, "findKey">; } declare module "lodash/findLastKey" { declare module.exports: $PropertyType<$Exports<"lodash">, "findLastKey">; } declare module "lodash/forIn" { declare module.exports: $PropertyType<$Exports<"lodash">, "forIn">; } declare module "lodash/forInRight" { declare module.exports: $PropertyType<$Exports<"lodash">, "forInRight">; } declare module "lodash/forOwn" { declare module.exports: $PropertyType<$Exports<"lodash">, "forOwn">; } declare module "lodash/forOwnRight" { declare module.exports: $PropertyType<$Exports<"lodash">, "forOwnRight">; } declare module "lodash/functions" { declare module.exports: $PropertyType<$Exports<"lodash">, "functions">; } declare module "lodash/functionsIn" { declare module.exports: $PropertyType<$Exports<"lodash">, "functionsIn">; } declare module "lodash/get" { declare module.exports: $PropertyType<$Exports<"lodash">, "get">; } declare module "lodash/has" { declare module.exports: $PropertyType<$Exports<"lodash">, "has">; } declare module "lodash/hasIn" { declare module.exports: $PropertyType<$Exports<"lodash">, "hasIn">; } declare module "lodash/invert" { declare module.exports: $PropertyType<$Exports<"lodash">, "invert">; } declare module "lodash/invertBy" { declare module.exports: $PropertyType<$Exports<"lodash">, "invertBy">; } declare module "lodash/invoke" { declare module.exports: $PropertyType<$Exports<"lodash">, "invoke">; } declare module "lodash/keys" { declare module.exports: $PropertyType<$Exports<"lodash">, "keys">; } declare module "lodash/keysIn" { declare module.exports: $PropertyType<$Exports<"lodash">, "keysIn">; } declare module "lodash/mapKeys" { declare module.exports: $PropertyType<$Exports<"lodash">, "mapKeys">; } declare module "lodash/mapValues" { declare module.exports: $PropertyType<$Exports<"lodash">, "mapValues">; } declare module "lodash/merge" { declare module.exports: $PropertyType<$Exports<"lodash">, "merge">; } declare module "lodash/mergeWith" { declare module.exports: $PropertyType<$Exports<"lodash">, "mergeWith">; } declare module "lodash/omit" { declare module.exports: $PropertyType<$Exports<"lodash">, "omit">; } declare module "lodash/omitBy" { declare module.exports: $PropertyType<$Exports<"lodash">, "omitBy">; } declare module "lodash/pick" { declare module.exports: $PropertyType<$Exports<"lodash">, "pick">; } declare module "lodash/pickBy" { declare module.exports: $PropertyType<$Exports<"lodash">, "pickBy">; } declare module "lodash/result" { declare module.exports: $PropertyType<$Exports<"lodash">, "result">; } declare module "lodash/set" { declare module.exports: $PropertyType<$Exports<"lodash">, "set">; } declare module "lodash/setWith" { declare module.exports: $PropertyType<$Exports<"lodash">, "setWith">; } declare module "lodash/toPairs" { declare module.exports: $PropertyType<$Exports<"lodash">, "toPairs">; } declare module "lodash/toPairsIn" { declare module.exports: $PropertyType<$Exports<"lodash">, "toPairsIn">; } declare module "lodash/transform" { declare module.exports: $PropertyType<$Exports<"lodash">, "transform">; } declare module "lodash/unset" { declare module.exports: $PropertyType<$Exports<"lodash">, "unset">; } declare module "lodash/update" { declare module.exports: $PropertyType<$Exports<"lodash">, "update">; } declare module "lodash/updateWith" { declare module.exports: $PropertyType<$Exports<"lodash">, "updateWith">; } declare module "lodash/values" { declare module.exports: $PropertyType<$Exports<"lodash">, "values">; } declare module "lodash/valuesIn" { declare module.exports: $PropertyType<$Exports<"lodash">, "valuesIn">; } declare module "lodash/chain" { declare module.exports: $PropertyType<$Exports<"lodash">, "chain">; } declare module "lodash/tap" { declare module.exports: $PropertyType<$Exports<"lodash">, "tap">; } declare module "lodash/thru" { declare module.exports: $PropertyType<$Exports<"lodash">, "thru">; } declare module "lodash/camelCase" { declare module.exports: $PropertyType<$Exports<"lodash">, "camelCase">; } declare module "lodash/capitalize" { declare module.exports: $PropertyType<$Exports<"lodash">, "capitalize">; } declare module "lodash/deburr" { declare module.exports: $PropertyType<$Exports<"lodash">, "deburr">; } declare module "lodash/endsWith" { declare module.exports: $PropertyType<$Exports<"lodash">, "endsWith">; } declare module "lodash/escape" { declare module.exports: $PropertyType<$Exports<"lodash">, "escape">; } declare module "lodash/escapeRegExp" { declare module.exports: $PropertyType<$Exports<"lodash">, "escapeRegExp">; } declare module "lodash/kebabCase" { declare module.exports: $PropertyType<$Exports<"lodash">, "kebabCase">; } declare module "lodash/lowerCase" { declare module.exports: $PropertyType<$Exports<"lodash">, "lowerCase">; } declare module "lodash/lowerFirst" { declare module.exports: $PropertyType<$Exports<"lodash">, "lowerFirst">; } declare module "lodash/pad" { declare module.exports: $PropertyType<$Exports<"lodash">, "pad">; } declare module "lodash/padEnd" { declare module.exports: $PropertyType<$Exports<"lodash">, "padEnd">; } declare module "lodash/padStart" { declare module.exports: $PropertyType<$Exports<"lodash">, "padStart">; } declare module "lodash/parseInt" { declare module.exports: $PropertyType<$Exports<"lodash">, "parseInt">; } declare module "lodash/repeat" { declare module.exports: $PropertyType<$Exports<"lodash">, "repeat">; } declare module "lodash/replace" { declare module.exports: $PropertyType<$Exports<"lodash">, "replace">; } declare module "lodash/snakeCase" { declare module.exports: $PropertyType<$Exports<"lodash">, "snakeCase">; } declare module "lodash/split" { declare module.exports: $PropertyType<$Exports<"lodash">, "split">; } declare module "lodash/startCase" { declare module.exports: $PropertyType<$Exports<"lodash">, "startCase">; } declare module "lodash/startsWith" { declare module.exports: $PropertyType<$Exports<"lodash">, "startsWith">; } declare module "lodash/template" { declare module.exports: $PropertyType<$Exports<"lodash">, "template">; } declare module "lodash/toLower" { declare module.exports: $PropertyType<$Exports<"lodash">, "toLower">; } declare module "lodash/toUpper" { declare module.exports: $PropertyType<$Exports<"lodash">, "toUpper">; } declare module "lodash/trim" { declare module.exports: $PropertyType<$Exports<"lodash">, "trim">; } declare module "lodash/trimEnd" { declare module.exports: $PropertyType<$Exports<"lodash">, "trimEnd">; } declare module "lodash/trimStart" { declare module.exports: $PropertyType<$Exports<"lodash">, "trimStart">; } declare module "lodash/truncate" { declare module.exports: $PropertyType<$Exports<"lodash">, "truncate">; } declare module "lodash/unescape" { declare module.exports: $PropertyType<$Exports<"lodash">, "unescape">; } declare module "lodash/upperCase" { declare module.exports: $PropertyType<$Exports<"lodash">, "upperCase">; } declare module "lodash/upperFirst" { declare module.exports: $PropertyType<$Exports<"lodash">, "upperFirst">; } declare module "lodash/words" { declare module.exports: $PropertyType<$Exports<"lodash">, "words">; } declare module "lodash/attempt" { declare module.exports: $PropertyType<$Exports<"lodash">, "attempt">; } declare module "lodash/bindAll" { declare module.exports: $PropertyType<$Exports<"lodash">, "bindAll">; } declare module "lodash/cond" { declare module.exports: $PropertyType<$Exports<"lodash">, "cond">; } declare module "lodash/conforms" { declare module.exports: $PropertyType<$Exports<"lodash">, "conforms">; } declare module "lodash/constant" { declare module.exports: $PropertyType<$Exports<"lodash">, "constant">; } declare module "lodash/defaultTo" { declare module.exports: $PropertyType<$Exports<"lodash">, "defaultTo">; } declare module "lodash/flow" { declare module.exports: $PropertyType<$Exports<"lodash">, "flow">; } declare module "lodash/flowRight" { declare module.exports: $PropertyType<$Exports<"lodash">, "flowRight">; } declare module "lodash/identity" { declare module.exports: $PropertyType<$Exports<"lodash">, "identity">; } declare module "lodash/iteratee" { declare module.exports: $PropertyType<$Exports<"lodash">, "iteratee">; } declare module "lodash/matches" { declare module.exports: $PropertyType<$Exports<"lodash">, "matches">; } declare module "lodash/matchesProperty" { declare module.exports: $PropertyType<$Exports<"lodash">, "matchesProperty">; } declare module "lodash/method" { declare module.exports: $PropertyType<$Exports<"lodash">, "method">; } declare module "lodash/methodOf" { declare module.exports: $PropertyType<$Exports<"lodash">, "methodOf">; } declare module "lodash/mixin" { declare module.exports: $PropertyType<$Exports<"lodash">, "mixin">; } declare module "lodash/noConflict" { declare module.exports: $PropertyType<$Exports<"lodash">, "noConflict">; } declare module "lodash/noop" { declare module.exports: $PropertyType<$Exports<"lodash">, "noop">; } declare module "lodash/nthArg" { declare module.exports: $PropertyType<$Exports<"lodash">, "nthArg">; } declare module "lodash/over" { declare module.exports: $PropertyType<$Exports<"lodash">, "over">; } declare module "lodash/overEvery" { declare module.exports: $PropertyType<$Exports<"lodash">, "overEvery">; } declare module "lodash/overSome" { declare module.exports: $PropertyType<$Exports<"lodash">, "overSome">; } declare module "lodash/property" { declare module.exports: $PropertyType<$Exports<"lodash">, "property">; } declare module "lodash/propertyOf" { declare module.exports: $PropertyType<$Exports<"lodash">, "propertyOf">; } declare module "lodash/range" { declare module.exports: $PropertyType<$Exports<"lodash">, "range">; } declare module "lodash/rangeRight" { declare module.exports: $PropertyType<$Exports<"lodash">, "rangeRight">; } declare module "lodash/runInContext" { declare module.exports: $PropertyType<$Exports<"lodash">, "runInContext">; } declare module "lodash/stubArray" { declare module.exports: $PropertyType<$Exports<"lodash">, "stubArray">; } declare module "lodash/stubFalse" { declare module.exports: $PropertyType<$Exports<"lodash">, "stubFalse">; } declare module "lodash/stubObject" { declare module.exports: $PropertyType<$Exports<"lodash">, "stubObject">; } declare module "lodash/stubString" { declare module.exports: $PropertyType<$Exports<"lodash">, "stubString">; } declare module "lodash/stubTrue" { declare module.exports: $PropertyType<$Exports<"lodash">, "stubTrue">; } declare module "lodash/times" { declare module.exports: $PropertyType<$Exports<"lodash">, "times">; } declare module "lodash/toPath" { declare module.exports: $PropertyType<$Exports<"lodash">, "toPath">; } declare module "lodash/uniqueId" { declare module.exports: $PropertyType<$Exports<"lodash">, "uniqueId">; } declare module "lodash/fp/chunk" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "chunk">; } declare module "lodash/fp/compact" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "compact">; } declare module "lodash/fp/concat" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "concat">; } declare module "lodash/fp/difference" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "difference">; } declare module "lodash/fp/differenceBy" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "differenceBy">; } declare module "lodash/fp/differenceWith" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "differenceWith">; } declare module "lodash/fp/drop" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "drop">; } declare module "lodash/fp/dropLast" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "dropLast">; } declare module "lodash/fp/dropRight" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "dropRight">; } declare module "lodash/fp/dropRightWhile" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "dropRightWhile">; } declare module "lodash/fp/dropWhile" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "dropWhile">; } declare module "lodash/fp/dropLastWhile" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "dropLastWhile">; } declare module "lodash/fp/fill" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "fill">; } declare module "lodash/fp/findIndex" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "findIndex">; } declare module "lodash/fp/findIndexFrom" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "findIndexFrom">; } declare module "lodash/fp/findLastIndex" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "findLastIndex">; } declare module "lodash/fp/findLastIndexFrom" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "findLastIndexFrom">; } declare module "lodash/fp/first" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "first">; } declare module "lodash/fp/flatten" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "flatten">; } declare module "lodash/fp/unnest" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "unnest">; } declare module "lodash/fp/flattenDeep" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "flattenDeep">; } declare module "lodash/fp/flattenDepth" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "flattenDepth">; } declare module "lodash/fp/fromPairs" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "fromPairs">; } declare module "lodash/fp/head" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "head">; } declare module "lodash/fp/indexOf" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "indexOf">; } declare module "lodash/fp/indexOfFrom" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "indexOfFrom">; } declare module "lodash/fp/initial" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "initial">; } declare module "lodash/fp/init" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "init">; } declare module "lodash/fp/intersection" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "intersection">; } declare module "lodash/fp/intersectionBy" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "intersectionBy">; } declare module "lodash/fp/intersectionWith" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "intersectionWith">; } declare module "lodash/fp/join" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "join">; } declare module "lodash/fp/last" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "last">; } declare module "lodash/fp/lastIndexOf" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "lastIndexOf">; } declare module "lodash/fp/lastIndexOfFrom" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "lastIndexOfFrom">; } declare module "lodash/fp/nth" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "nth">; } declare module "lodash/fp/pull" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "pull">; } declare module "lodash/fp/pullAll" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "pullAll">; } declare module "lodash/fp/pullAllBy" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "pullAllBy">; } declare module "lodash/fp/pullAllWith" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "pullAllWith">; } declare module "lodash/fp/pullAt" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "pullAt">; } declare module "lodash/fp/remove" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "remove">; } declare module "lodash/fp/reverse" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "reverse">; } declare module "lodash/fp/slice" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "slice">; } declare module "lodash/fp/sortedIndex" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "sortedIndex">; } declare module "lodash/fp/sortedIndexBy" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "sortedIndexBy">; } declare module "lodash/fp/sortedIndexOf" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "sortedIndexOf">; } declare module "lodash/fp/sortedLastIndex" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "sortedLastIndex">; } declare module "lodash/fp/sortedLastIndexBy" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "sortedLastIndexBy">; } declare module "lodash/fp/sortedLastIndexOf" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "sortedLastIndexOf">; } declare module "lodash/fp/sortedUniq" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "sortedUniq">; } declare module "lodash/fp/sortedUniqBy" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "sortedUniqBy">; } declare module "lodash/fp/tail" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "tail">; } declare module "lodash/fp/take" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "take">; } declare module "lodash/fp/takeRight" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "takeRight">; } declare module "lodash/fp/takeLast" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "takeLast">; } declare module "lodash/fp/takeRightWhile" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "takeRightWhile">; } declare module "lodash/fp/takeLastWhile" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "takeLastWhile">; } declare module "lodash/fp/takeWhile" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "takeWhile">; } declare module "lodash/fp/union" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "union">; } declare module "lodash/fp/unionBy" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "unionBy">; } declare module "lodash/fp/unionWith" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "unionWith">; } declare module "lodash/fp/uniq" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "uniq">; } declare module "lodash/fp/uniqBy" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "uniqBy">; } declare module "lodash/fp/uniqWith" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "uniqWith">; } declare module "lodash/fp/unzip" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "unzip">; } declare module "lodash/fp/unzipWith" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "unzipWith">; } declare module "lodash/fp/without" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "without">; } declare module "lodash/fp/xor" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "xor">; } declare module "lodash/fp/symmetricDifference" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "symmetricDifference">; } declare module "lodash/fp/xorBy" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "xorBy">; } declare module "lodash/fp/symmetricDifferenceBy" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "symmetricDifferenceBy">; } declare module "lodash/fp/xorWith" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "xorWith">; } declare module "lodash/fp/symmetricDifferenceWith" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "symmetricDifferenceWith">; } declare module "lodash/fp/zip" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "zip">; } declare module "lodash/fp/zipAll" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "zipAll">; } declare module "lodash/fp/zipObject" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "zipObject">; } declare module "lodash/fp/zipObj" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "zipObj">; } declare module "lodash/fp/zipObjectDeep" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "zipObjectDeep">; } declare module "lodash/fp/zipWith" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "zipWith">; } declare module "lodash/fp/countBy" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "countBy">; } declare module "lodash/fp/each" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "each">; } declare module "lodash/fp/eachRight" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "eachRight">; } declare module "lodash/fp/every" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "every">; } declare module "lodash/fp/all" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "all">; } declare module "lodash/fp/filter" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "filter">; } declare module "lodash/fp/find" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "find">; } declare module "lodash/fp/findFrom" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "findFrom">; } declare module "lodash/fp/findLast" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "findLast">; } declare module "lodash/fp/findLastFrom" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "findLastFrom">; } declare module "lodash/fp/flatMap" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "flatMap">; } declare module "lodash/fp/flatMapDeep" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "flatMapDeep">; } declare module "lodash/fp/flatMapDepth" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "flatMapDepth">; } declare module "lodash/fp/forEach" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "forEach">; } declare module "lodash/fp/forEachRight" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "forEachRight">; } declare module "lodash/fp/groupBy" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "groupBy">; } declare module "lodash/fp/includes" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "includes">; } declare module "lodash/fp/contains" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "contains">; } declare module "lodash/fp/includesFrom" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "includesFrom">; } declare module "lodash/fp/invokeMap" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "invokeMap">; } declare module "lodash/fp/invokeArgsMap" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "invokeArgsMap">; } declare module "lodash/fp/keyBy" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "keyBy">; } declare module "lodash/fp/indexBy" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "indexBy">; } declare module "lodash/fp/map" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "map">; } declare module "lodash/fp/pluck" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "pluck">; } declare module "lodash/fp/orderBy" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "orderBy">; } declare module "lodash/fp/partition" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "partition">; } declare module "lodash/fp/reduce" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "reduce">; } declare module "lodash/fp/reduceRight" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "reduceRight">; } declare module "lodash/fp/reject" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "reject">; } declare module "lodash/fp/sample" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "sample">; } declare module "lodash/fp/sampleSize" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "sampleSize">; } declare module "lodash/fp/shuffle" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "shuffle">; } declare module "lodash/fp/size" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "size">; } declare module "lodash/fp/some" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "some">; } declare module "lodash/fp/any" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "any">; } declare module "lodash/fp/sortBy" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "sortBy">; } declare module "lodash/fp/now" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "now">; } declare module "lodash/fp/after" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "after">; } declare module "lodash/fp/ary" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "ary">; } declare module "lodash/fp/nAry" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "nAry">; } declare module "lodash/fp/before" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "before">; } declare module "lodash/fp/bind" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "bind">; } declare module "lodash/fp/bindKey" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "bindKey">; } declare module "lodash/fp/curry" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "curry">; } declare module "lodash/fp/curryN" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "curryN">; } declare module "lodash/fp/curryRight" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "curryRight">; } declare module "lodash/fp/curryRightN" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "curryRightN">; } declare module "lodash/fp/debounce" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "debounce">; } declare module "lodash/fp/defer" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "defer">; } declare module "lodash/fp/delay" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "delay">; } declare module "lodash/fp/flip" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "flip">; } declare module "lodash/fp/memoize" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "memoize">; } declare module "lodash/fp/negate" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "negate">; } declare module "lodash/fp/complement" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "complement">; } declare module "lodash/fp/once" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "once">; } declare module "lodash/fp/overArgs" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "overArgs">; } declare module "lodash/fp/useWith" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "useWith">; } declare module "lodash/fp/partial" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "partial">; } declare module "lodash/fp/partialRight" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "partialRight">; } declare module "lodash/fp/rearg" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "rearg">; } declare module "lodash/fp/rest" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "rest">; } declare module "lodash/fp/unapply" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "unapply">; } declare module "lodash/fp/restFrom" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "restFrom">; } declare module "lodash/fp/spread" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "spread">; } declare module "lodash/fp/apply" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "apply">; } declare module "lodash/fp/spreadFrom" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "spreadFrom">; } declare module "lodash/fp/throttle" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "throttle">; } declare module "lodash/fp/unary" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "unary">; } declare module "lodash/fp/wrap" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "wrap">; } declare module "lodash/fp/castArray" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "castArray">; } declare module "lodash/fp/clone" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "clone">; } declare module "lodash/fp/cloneDeep" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "cloneDeep">; } declare module "lodash/fp/cloneDeepWith" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "cloneDeepWith">; } declare module "lodash/fp/cloneWith" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "cloneWith">; } declare module "lodash/fp/conformsTo" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "conformsTo">; } declare module "lodash/fp/where" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "where">; } declare module "lodash/fp/conforms" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "conforms">; } declare module "lodash/fp/eq" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "eq">; } declare module "lodash/fp/identical" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "identical">; } declare module "lodash/fp/gt" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "gt">; } declare module "lodash/fp/gte" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "gte">; } declare module "lodash/fp/isArguments" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isArguments">; } declare module "lodash/fp/isArray" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isArray">; } declare module "lodash/fp/isArrayBuffer" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isArrayBuffer">; } declare module "lodash/fp/isArrayLike" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isArrayLike">; } declare module "lodash/fp/isArrayLikeObject" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isArrayLikeObject">; } declare module "lodash/fp/isBoolean" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isBoolean">; } declare module "lodash/fp/isBuffer" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isBuffer">; } declare module "lodash/fp/isDate" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isDate">; } declare module "lodash/fp/isElement" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isElement">; } declare module "lodash/fp/isEmpty" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isEmpty">; } declare module "lodash/fp/isEqual" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isEqual">; } declare module "lodash/fp/equals" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "equals">; } declare module "lodash/fp/isEqualWith" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isEqualWith">; } declare module "lodash/fp/isError" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isError">; } declare module "lodash/fp/isFinite" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isFinite">; } declare module "lodash/fp/isFunction" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isFunction">; } declare module "lodash/fp/isInteger" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isInteger">; } declare module "lodash/fp/isLength" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isLength">; } declare module "lodash/fp/isMap" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isMap">; } declare module "lodash/fp/isMatch" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isMatch">; } declare module "lodash/fp/whereEq" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "whereEq">; } declare module "lodash/fp/isMatchWith" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isMatchWith">; } declare module "lodash/fp/isNaN" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isNaN">; } declare module "lodash/fp/isNative" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isNative">; } declare module "lodash/fp/isNil" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isNil">; } declare module "lodash/fp/isNull" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isNull">; } declare module "lodash/fp/isNumber" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isNumber">; } declare module "lodash/fp/isObject" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isObject">; } declare module "lodash/fp/isObjectLike" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isObjectLike">; } declare module "lodash/fp/isPlainObject" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isPlainObject">; } declare module "lodash/fp/isRegExp" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isRegExp">; } declare module "lodash/fp/isSafeInteger" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isSafeInteger">; } declare module "lodash/fp/isSet" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isSet">; } declare module "lodash/fp/isString" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isString">; } declare module "lodash/fp/isSymbol" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isSymbol">; } declare module "lodash/fp/isTypedArray" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isTypedArray">; } declare module "lodash/fp/isUndefined" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isUndefined">; } declare module "lodash/fp/isWeakMap" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isWeakMap">; } declare module "lodash/fp/isWeakSet" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "isWeakSet">; } declare module "lodash/fp/lt" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "lt">; } declare module "lodash/fp/lte" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "lte">; } declare module "lodash/fp/toArray" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "toArray">; } declare module "lodash/fp/toFinite" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "toFinite">; } declare module "lodash/fp/toInteger" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "toInteger">; } declare module "lodash/fp/toLength" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "toLength">; } declare module "lodash/fp/toNumber" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "toNumber">; } declare module "lodash/fp/toPlainObject" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "toPlainObject">; } declare module "lodash/fp/toSafeInteger" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "toSafeInteger">; } declare module "lodash/fp/toString" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "toString">; } declare module "lodash/fp/add" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "add">; } declare module "lodash/fp/ceil" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "ceil">; } declare module "lodash/fp/divide" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "divide">; } declare module "lodash/fp/floor" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "floor">; } declare module "lodash/fp/max" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "max">; } declare module "lodash/fp/maxBy" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "maxBy">; } declare module "lodash/fp/mean" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "mean">; } declare module "lodash/fp/meanBy" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "meanBy">; } declare module "lodash/fp/min" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "min">; } declare module "lodash/fp/minBy" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "minBy">; } declare module "lodash/fp/multiply" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "multiply">; } declare module "lodash/fp/round" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "round">; } declare module "lodash/fp/subtract" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "subtract">; } declare module "lodash/fp/sum" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "sum">; } declare module "lodash/fp/sumBy" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "sumBy">; } declare module "lodash/fp/clamp" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "clamp">; } declare module "lodash/fp/inRange" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "inRange">; } declare module "lodash/fp/random" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "random">; } declare module "lodash/fp/assign" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "assign">; } declare module "lodash/fp/assignAll" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "assignAll">; } declare module "lodash/fp/assignInAll" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "assignInAll">; } declare module "lodash/fp/extendAll" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "extendAll">; } declare module "lodash/fp/assignIn" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "assignIn">; } declare module "lodash/fp/assignInWith" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "assignInWith">; } declare module "lodash/fp/assignWith" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "assignWith">; } declare module "lodash/fp/assignInAllWith" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "assignInAllWith">; } declare module "lodash/fp/extendAllWith" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "extendAllWith">; } declare module "lodash/fp/assignAllWith" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "assignAllWith">; } declare module "lodash/fp/at" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "at">; } declare module "lodash/fp/props" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "props">; } declare module "lodash/fp/paths" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "paths">; } declare module "lodash/fp/create" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "create">; } declare module "lodash/fp/defaults" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "defaults">; } declare module "lodash/fp/defaultsAll" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "defaultsAll">; } declare module "lodash/fp/defaultsDeep" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "defaultsDeep">; } declare module "lodash/fp/defaultsDeepAll" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "defaultsDeepAll">; } declare module "lodash/fp/entries" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "entries">; } declare module "lodash/fp/entriesIn" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "entriesIn">; } declare module "lodash/fp/extend" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "extend">; } declare module "lodash/fp/extendWith" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "extendWith">; } declare module "lodash/fp/findKey" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "findKey">; } declare module "lodash/fp/findLastKey" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "findLastKey">; } declare module "lodash/fp/forIn" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "forIn">; } declare module "lodash/fp/forInRight" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "forInRight">; } declare module "lodash/fp/forOwn" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "forOwn">; } declare module "lodash/fp/forOwnRight" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "forOwnRight">; } declare module "lodash/fp/functions" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "functions">; } declare module "lodash/fp/functionsIn" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "functionsIn">; } declare module "lodash/fp/get" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "get">; } declare module "lodash/fp/prop" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "prop">; } declare module "lodash/fp/path" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "path">; } declare module "lodash/fp/getOr" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "getOr">; } declare module "lodash/fp/propOr" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "propOr">; } declare module "lodash/fp/pathOr" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "pathOr">; } declare module "lodash/fp/has" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "has">; } declare module "lodash/fp/hasIn" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "hasIn">; } declare module "lodash/fp/invert" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "invert">; } declare module "lodash/fp/invertObj" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "invertObj">; } declare module "lodash/fp/invertBy" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "invertBy">; } declare module "lodash/fp/invoke" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "invoke">; } declare module "lodash/fp/invokeArgs" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "invokeArgs">; } declare module "lodash/fp/keys" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "keys">; } declare module "lodash/fp/keysIn" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "keysIn">; } declare module "lodash/fp/mapKeys" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "mapKeys">; } declare module "lodash/fp/mapValues" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "mapValues">; } declare module "lodash/fp/merge" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "merge">; } declare module "lodash/fp/mergeAll" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "mergeAll">; } declare module "lodash/fp/mergeWith" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "mergeWith">; } declare module "lodash/fp/mergeAllWith" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "mergeAllWith">; } declare module "lodash/fp/omit" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "omit">; } declare module "lodash/fp/omitAll" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "omitAll">; } declare module "lodash/fp/omitBy" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "omitBy">; } declare module "lodash/fp/pick" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "pick">; } declare module "lodash/fp/pickAll" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "pickAll">; } declare module "lodash/fp/pickBy" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "pickBy">; } declare module "lodash/fp/result" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "result">; } declare module "lodash/fp/set" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "set">; } declare module "lodash/fp/assoc" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "assoc">; } declare module "lodash/fp/assocPath" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "assocPath">; } declare module "lodash/fp/setWith" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "setWith">; } declare module "lodash/fp/toPairs" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "toPairs">; } declare module "lodash/fp/toPairsIn" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "toPairsIn">; } declare module "lodash/fp/transform" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "transform">; } declare module "lodash/fp/unset" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "unset">; } declare module "lodash/fp/dissoc" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "dissoc">; } declare module "lodash/fp/dissocPath" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "dissocPath">; } declare module "lodash/fp/update" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "update">; } declare module "lodash/fp/updateWith" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "updateWith">; } declare module "lodash/fp/values" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "values">; } declare module "lodash/fp/valuesIn" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "valuesIn">; } declare module "lodash/fp/tap" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "tap">; } declare module "lodash/fp/thru" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "thru">; } declare module "lodash/fp/camelCase" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "camelCase">; } declare module "lodash/fp/capitalize" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "capitalize">; } declare module "lodash/fp/deburr" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "deburr">; } declare module "lodash/fp/endsWith" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "endsWith">; } declare module "lodash/fp/escape" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "escape">; } declare module "lodash/fp/escapeRegExp" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "escapeRegExp">; } declare module "lodash/fp/kebabCase" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "kebabCase">; } declare module "lodash/fp/lowerCase" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "lowerCase">; } declare module "lodash/fp/lowerFirst" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "lowerFirst">; } declare module "lodash/fp/pad" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "pad">; } declare module "lodash/fp/padChars" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "padChars">; } declare module "lodash/fp/padEnd" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "padEnd">; } declare module "lodash/fp/padCharsEnd" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "padCharsEnd">; } declare module "lodash/fp/padStart" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "padStart">; } declare module "lodash/fp/padCharsStart" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "padCharsStart">; } declare module "lodash/fp/parseInt" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "parseInt">; } declare module "lodash/fp/repeat" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "repeat">; } declare module "lodash/fp/replace" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "replace">; } declare module "lodash/fp/snakeCase" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "snakeCase">; } declare module "lodash/fp/split" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "split">; } declare module "lodash/fp/startCase" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "startCase">; } declare module "lodash/fp/startsWith" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "startsWith">; } declare module "lodash/fp/template" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "template">; } declare module "lodash/fp/toLower" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "toLower">; } declare module "lodash/fp/toUpper" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "toUpper">; } declare module "lodash/fp/trim" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "trim">; } declare module "lodash/fp/trimChars" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "trimChars">; } declare module "lodash/fp/trimEnd" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "trimEnd">; } declare module "lodash/fp/trimCharsEnd" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "trimCharsEnd">; } declare module "lodash/fp/trimStart" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "trimStart">; } declare module "lodash/fp/trimCharsStart" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "trimCharsStart">; } declare module "lodash/fp/truncate" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "truncate">; } declare module "lodash/fp/unescape" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "unescape">; } declare module "lodash/fp/upperCase" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "upperCase">; } declare module "lodash/fp/upperFirst" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "upperFirst">; } declare module "lodash/fp/words" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "words">; } declare module "lodash/fp/attempt" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "attempt">; } declare module "lodash/fp/bindAll" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "bindAll">; } declare module "lodash/fp/cond" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "cond">; } declare module "lodash/fp/constant" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "constant">; } declare module "lodash/fp/always" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "always">; } declare module "lodash/fp/defaultTo" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "defaultTo">; } declare module "lodash/fp/flow" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "flow">; } declare module "lodash/fp/pipe" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "pipe">; } declare module "lodash/fp/flowRight" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "flowRight">; } declare module "lodash/fp/compose" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "compose">; } declare module "lodash/fp/identity" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "identity">; } declare module "lodash/fp/iteratee" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "iteratee">; } declare module "lodash/fp/matches" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "matches">; } declare module "lodash/fp/matchesProperty" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "matchesProperty">; } declare module "lodash/fp/propEq" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "propEq">; } declare module "lodash/fp/pathEq" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "pathEq">; } declare module "lodash/fp/method" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "method">; } declare module "lodash/fp/methodOf" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "methodOf">; } declare module "lodash/fp/mixin" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "mixin">; } declare module "lodash/fp/noConflict" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "noConflict">; } declare module "lodash/fp/noop" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "noop">; } declare module "lodash/fp/nthArg" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "nthArg">; } declare module "lodash/fp/over" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "over">; } declare module "lodash/fp/juxt" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "juxt">; } declare module "lodash/fp/overEvery" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "overEvery">; } declare module "lodash/fp/allPass" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "allPass">; } declare module "lodash/fp/overSome" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "overSome">; } declare module "lodash/fp/anyPass" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "anyPass">; } declare module "lodash/fp/property" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "property">; } declare module "lodash/fp/propertyOf" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "propertyOf">; } declare module "lodash/fp/range" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "range">; } declare module "lodash/fp/rangeStep" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "rangeStep">; } declare module "lodash/fp/rangeRight" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "rangeRight">; } declare module "lodash/fp/rangeStepRight" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "rangeStepRight">; } declare module "lodash/fp/runInContext" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "runInContext">; } declare module "lodash/fp/stubArray" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "stubArray">; } declare module "lodash/fp/stubFalse" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "stubFalse">; } declare module "lodash/fp/F" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "F">; } declare module "lodash/fp/stubObject" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "stubObject">; } declare module "lodash/fp/stubString" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "stubString">; } declare module "lodash/fp/stubTrue" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "stubTrue">; } declare module "lodash/fp/T" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "T">; } declare module "lodash/fp/times" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "times">; } declare module "lodash/fp/toPath" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "toPath">; } declare module "lodash/fp/uniqueId" { declare module.exports: $PropertyType<$Exports<"lodash/fp">, "uniqueId">; } ================================================ FILE: jest.config.js ================================================ module.exports = { transform: { "^.+\\.tsx?$": "ts-jest" }, testMatch: ["**/__tests__/**/*_spec.ts?(x)", "**/?(*.)(spec|test).ts?(x)"], setupFilesAfterEnv: [`${__dirname}/jestFrameworkSetup.js`] }; ================================================ FILE: jestFrameworkSetup.js ================================================ class Request { } class Response { constructor(body) { this.body = body; this.ok = true; } json() { return Promise.resolve(JSON.parse(this.body)); } } const fetch = () => { return Promise.resolve(new Response()); }; global.Request = Request; global.Response = Response; global.fetch = fetch; ================================================ FILE: md/end.md ================================================ # Authors [@rpunkfu](https://github.com/rpunkfu) - [@zzarcon](https://github.com/zzarcon) ================================================ FILE: md/start.md ================================================ # Kakapo.js [![Build Status](https://travis-ci.org/devlucky/Kakapo.js.svg?branch=master)](https://travis-ci.org/devlucky/Kakapo.js) [![codecov.io](https://codecov.io/github/devlucky/Kakapo.js/coverage.svg?branch=master)](https://codecov.io/github/devlucky/Kakapo.js?branch=master) [![npm version](https://badge.fury.io/js/kakapo.svg)](https://npmjs.com/package/kakapo) [![dependencies](https://david-dm.org/devlucky/Kakapo.js.svg)](https://david-dm.org/devlucky/Kakapo.js) [![npm license](https://img.shields.io/npm/l/awesome-badges.svg)](https://tldrlegal.com/license/mit-license) > Next generation mocking framework in Javascript - [docs](http://devlucky.github.io/kakapo-js) ## Contents - [Getting started](#getting-started) - [Installation](#installation) - [Examples](#examples) - [Basic](#basic) - [Using the DB](#using-the-db) - [Unchaining the Router](#unchaining-the-router) - [Fetch & XMLHttpRequest support](#fetch--xmlhttprequest-support) - [Database candyness](#database-candyness) - [Passthrough](#passthrough) - [Demo Apps](#demo-apps) - [TODO App](#todo-app) - [Github explorer](#github-explorer) - [Components](#components) - [Server](#server) - [Router](#router) - [Database](#database) - [Response](#response) - [Serializers](#serializers) - [Interceptors](#interceptors) - [Scenarios](#scenarios) - [Fake data](#fake-data) - [Browser support](#browser-support) - [Roadmap](#roadmap) ================================================ FILE: package.json ================================================ { "name": "kakapo", "version": "4.0.6", "description": "Next generation mocking framework in Javascript", "main": "dist/index.js", "atlaskit:src": "dist/index.js", "types": "dist/index.d.ts", "scripts": { "build": "tsc -p tsconfig.dist.json", "typecheck": "tsc --noEmit", "readme": "node create-readme.js", "test": "jest", "test:ci": "jest --runInBand --coverage", "test:watch": "jest --watch", "amend": "git add . && git commit --amend --reuse-message=HEAD", "push": "git push --tags && git push", "prepublishOnly": "yarn build", "release": "yarn publish --silent --new-version patch && yarn push", "perf:build": "yarn build && webpack-cli --config webpack.perf.config.js", "perf:stats": "webpack-cli --config webpack.perf.config.js --json > perf/dist/stats.json", "perf:analyze": "webpack-bundle-analyzer perf/dist/stats.json", "perf": "mkdir -p ./perf/dist && yarn perf:build && yarn perf:stats && yarn perf:analyze" }, "repository": { "type": "git", "url": "git+https://github.com/devlucky/Kakapo.js.git" }, "author": "devlucky", "license": "MIT", "bugs": { "url": "https://github.com/devlucky/Kakapo.js/issues" }, "homepage": "https://github.com/devlucky/Kakapo.js#readme", "devDependencies": { "@types/faker": "^4.1.5", "@types/jest": "^24.0.12", "@types/lodash.filter": "^4.6.0", "@types/lodash.first": "^3.0.0", "@types/lodash.foreach": "^4.5.0", "@types/lodash.includes": "^4.3.0", "@types/lodash.keys": "^4.2.0", "@types/lodash.last": "^3.0.0", "@types/lodash.merge": "^4.6.1", "@types/lodash.pickby": "^4.6.0", "@types/lodash.sample": "^4.2.1", "@typescript-eslint/eslint-plugin": "^1.8.0", "@typescript-eslint/parser": "^1.8.0", "eslint": "^5.16.0", "faker": "^3.1.0", "jest": "^24.8.0", "jquery": "^2.2.4", "superagent": "^2.0.0", "ts-jest": "^24.0.2", "ts-loader": "^6.0.0", "typescript": "^3.4.5", "webpack": "^4.8.1", "webpack-bundle-analyzer": "^2.11.1", "webpack-cli": "^2.1.3" }, "dependencies": { "lodash.filter": "^4.6.0", "lodash.first": "^3.0.0", "lodash.foreach": "^4.5.0", "lodash.includes": "^4.3.0", "lodash.keys": "^4.2.0", "lodash.last": "^3.0.0", "lodash.merge": "^4.6.1", "lodash.pickby": "^4.6.0", "lodash.sample": "^4.2.1", "parse-url": "^1.3.0", "path-match": "^1.2.4", "query-string": "^4.1.0" }, "keywords": [ "mocking", "framework", "kakapo", "fetch", "XMLHttpRequest", "fake", "stub", "request" ], "files": [ "dist" ] } ================================================ FILE: perf/index.js ================================================ const Kakapo=require('../dist'); console.log(Kakapo); ================================================ FILE: src/Database/index.ts ================================================ import sample from 'lodash.sample'; import first from 'lodash.first'; import last from 'lodash.last'; import filter from 'lodash.filter'; type DataType = any; export interface DatabaseSchema { [collectionName: string]: DataType; // <- DataType in Collection } type CollectionStore = { [P in keyof M]?: Collection }; export interface Collection { uuid: number; factory: DataFactory; records: DataRecord[]; } export type DataFactory = () => D; export type RecordId = number; export interface DataRecord { id: RecordId; data: D; } export class Database { private collectionStore: CollectionStore; constructor() { this.collectionStore = {}; } all(collectionName: K): DataRecord[] { const { records } = this.getCollection(collectionName); return records; } belongsTo( collectionName: K, conditions: Partial ): () => DataRecord | undefined { return () => { if (conditions) { return this.findOne(collectionName, conditions); } else { return sample(this.all(collectionName)); } }; } create( collectionName: K, size: number = 1, factory?: DataFactory ): DataRecord[] { const dataFactory = factory || this.getCollection(collectionName).factory; const records = []; for (let index = 0; index < size; index++) { const data = dataFactory(); const record = this.push(collectionName, data); records.push(record); } return records; } delete( collectionName: K, id: RecordId ): DataRecord | null { const collection = this.getCollection(collectionName); const { records } = collection; const record = records.reduce((result: DataRecord | undefined, record) => record.id === id ? record : result, undefined); if (record) { const index = records.indexOf(record); records.splice(index, 1); return record; } else { return null; } } exists(collectionName: K): boolean { return !!this.collectionStore[collectionName]; } find( collectionName: K, conditions: Partial ): DataRecord[] { const { records } = this.getCollection(collectionName); return filter(records, { data: conditions }) as DataRecord[]; } findOne( collectionName: K, conditions: Partial ): DataRecord | undefined { return first(this.find(collectionName, conditions)); } first(collectionName: K): DataRecord | undefined { const { records } = this.getCollection(collectionName); return first(records); } last(collectionName: K): DataRecord | undefined { const { records } = this.getCollection(collectionName); return last(records); } push( collectionName: K, data: M[K] ): DataRecord { const collection = this.getCollection(collectionName); const { uuid, records } = collection; const record = { id: uuid, data }; records.push(record); collection.uuid++; return record; } register( collectionName: K, factory: DataFactory ) { this.collectionStore[collectionName] = { uuid: 0, records: [], factory }; } reset() { this.collectionStore = {}; } update( collectionName: K, id: RecordId, data: Partial ): DataRecord { const collection = this.getCollection(collectionName); const { records } = collection; const oldRecord = this.delete(collectionName, id); if (oldRecord) { const record = { ...oldRecord, data: { ...oldRecord.data, ...data } }; records.push(record); return record; } else { throw new RecordNotFoundError(collectionName as string, id); } } getCollection( collectionName: K ): Collection { const collection = this.collectionStore[collectionName] as Collection | undefined; if (collection) { return collection; } else { throw new CollectionNotFoundError(collectionName as string); } } } export class CollectionNotFoundError extends Error { constructor(collectionName: string) { super(`Collection ${collectionName} not found`); } } export class RecordNotFoundError extends Error { constructor(collectionName: string, id: RecordId) { super(`Record ${id} not found in collection ${collectionName}`); } } ================================================ FILE: src/Request/index.ts ================================================ export interface KakapoRequestOptions { params: any; query: any; body?: any; headers: any; } export class KakapoRequest { params: any; query: any; body: any | null; headers: any; constructor(options: KakapoRequestOptions) { this.params = options.params || {}; this.query = options.query || {}; this.body = options.body || null; this.headers = options.headers || {}; } } ================================================ FILE: src/Response/index.ts ================================================ export class KakapoResponse { code: number; body: any; headers: { [header: string]: string }; constructor( code: number = 200, body: any = {}, headers: { [header: string]: string } = {} ) { this.code = code; this.body = body; this.headers = headers; } get error() { return this.code >= 400; } get ok() { return this.code >= 200 && this.code <= 299; } static wrap(response: any): KakapoResponse { if (response instanceof KakapoResponse) { return response; } else { return new KakapoResponse(200, response, { "content-type": "application/json; charset=utf-8" }); } } } ================================================ FILE: src/Router/index.ts ================================================ import merge from 'lodash.merge'; import forEach from 'lodash.foreach'; import { interceptors, Interceptors } from '../interceptors'; import environment from '../config/environment'; import { InterceptorConfig, RouterHandler } from '../interceptors/interceptorHelper'; import { DatabaseSchema } from '../Database'; const browserStrategies: (keyof Interceptors)[] = ['fetch', 'XMLHttpRequest']; //TODO: find proper name for Node.js strategies const nodeStrategies: (keyof Interceptors)[] = ['http', 'https']; const routerDefaultConfig: RouterConfig = { strategies: environment.browserEnv ? browserStrategies : nodeStrategies }; const interceptorDefaultConfig: InterceptorConfig = { db: null, host: '', requestDelay: 0, routes: { GET: {}, POST: {}, PUT: {}, DELETE: {}, HEAD: {} } }; export interface RouterConfig { strategies: (keyof Interceptors)[]; } export class Router { interceptorConfig: InterceptorConfig; constructor( interceptorConfig: Partial> = interceptorDefaultConfig, public routerConfig: RouterConfig = routerDefaultConfig ) { this.interceptorConfig = merge( {}, interceptorDefaultConfig, interceptorConfig ); } get(path: string, handler: RouterHandler) { this.register('GET', path, handler); } post(path: string, handler: RouterHandler) { this.register('POST', path, handler); } put(path: string, handler: RouterHandler) { this.register('PUT', path, handler); } delete(path: string, handler: RouterHandler) { this.register('DELETE', path, handler); } head(path: string, handler: RouterHandler) { this.register('HEAD', path, handler); } register(method: string, path: string, handler: RouterHandler) { this.interceptorConfig.routes[method][path] = handler; } intercept() { const strategies = this.routerConfig.strategies; forEach(strategies, (name: keyof Interceptors) => interceptors[name].enable(this.interceptorConfig) ); } reset() { //TODO: Don't reset all 'interceptors' forEach(interceptors, (interceptor: Interceptors[keyof Interceptors]) => interceptor.disable()); } } ================================================ FILE: src/Server/index.ts ================================================ import { Router } from '../Router'; import { Database, DatabaseSchema } from '../Database'; const isRouter = (entity: any): entity is Router => entity instanceof Router; const isDb = (entity: any): entity is Database => entity instanceof Database; export class Server { db: Database | null = null; router: Router | null = null; constructor(readonly config: any = {}) {} use(entity: Database | Router) { if (isDb(entity)) { this.db = entity; } else if (isRouter(entity)) { this.router = entity; this.router.intercept(); } else { console.warn( `KAKAPO: Server doesn't know how to use the entity ${entity}` ); } this.linkEntities(); } remove(entity: Database | Router) { if ( isDb(entity) && this.router && this.router.interceptorConfig.db === entity ) { this.router.interceptorConfig.db = null; } else if (isRouter(entity) && this.router == entity) { this.router.reset(); } else { console.warn("KAKAPO: Entity doesn't belongs to server", entity); } } linkEntities() { const router = this.router; const db = this.db; if (router && db && router.interceptorConfig.db !== db) { router.interceptorConfig.db = db; } } } ================================================ FILE: src/config/environment.ts ================================================ declare var global: any; const browserEnv = typeof window === 'object'; const nodeEnv = typeof global === 'object'; const name = browserEnv ? 'browser' : nodeEnv ? 'node' : 'unknown'; export default { name, browserEnv, nodeEnv }; ================================================ FILE: src/index.ts ================================================ export { Database, DataRecord } from './Database'; export { Router, RouterConfig } from './Router'; export { Server } from './Server'; export { KakapoResponse } from './Response'; export { KakapoRequest } from './Request'; export { InterceptorConfig, RouterHandler } from './interceptors/interceptorHelper'; ================================================ FILE: src/interceptors/fetchInterceptor.ts ================================================ import { KakapoResponse } from '../Response'; import { KakapoRequest } from '../Request'; import { interceptorHelper, Interceptor, InterceptorConfig } from './interceptorHelper'; import { mapRequestInfoToUrlString, canUseWindow } from '../utils'; import { Database, DatabaseSchema } from '../Database'; const fakeResponse = ( response: string | any = {}, headers: { [k: string]: string } = {} ) => { // If content type exist and is different to application/json no parse the response if ( headers['content-type'] && headers['content-type'].indexOf('application/json') == -1 ) { return new Response(response, { headers }); } // Default handler, If no content type response as json. return new Response(JSON.stringify(response), { headers }); }; export class FakeFetchFactory { interceptors: Interceptor[]; constructor() { this.interceptors = []; } use(config: InterceptorConfig) { this.interceptors.push(interceptorHelper(config)); } getFetch(): typeof fetch { return ( requestInfo: RequestInfo, options: RequestInit = {} ): Promise => { const url = mapRequestInfoToUrlString(requestInfo); const method = options.method || 'GET'; const interceptor = this.interceptors.reduce( (result: Interceptor | undefined, interceptor) => interceptor.getHandler(url, method) !== null ? interceptor : result, undefined ); if (interceptor) { const handler = interceptor.getHandler(url, method); if (handler) { const request = new KakapoRequest({ params: interceptor.getParams(url, method), query: interceptor.getQuery(url), body: options.body || '', headers: options.headers || {} }); const db = interceptor.getDB() || new Database(); const response = handler(request, db); if (response instanceof Promise) { //TODO: Should we handle 'requestDelay' also for async responses? return response.then(data => { if (data instanceof KakapoResponse) { return fakeResponse(data.body, data.headers); } return fakeResponse(data) }); } if (!(response instanceof KakapoResponse)) { return new Promise(resolve => setTimeout( () => resolve(fakeResponse(response)), interceptor.getDelay() ) ); } const result = fakeResponse(response.body, response.headers); return new Promise((resolve, reject) => setTimeout(() => { if (response.error) { return reject(result); } return resolve(result); }, interceptor.getDelay()) ); } else { return nativeFetch(url, options); } } else { return nativeFetch(url, options); } }; } } let nativeFetch: typeof fetch; export function isFakeFetch(fetch: any): fetch is FakeFetchFactory { return window.fetch !== nativeFetch; } const fakeFetchFactory = new FakeFetchFactory(); export const enable = (config: InterceptorConfig) => { if (!canUseWindow) { throw new Error(`You're trying to use fetch interceptor in non-browser environment`); } if (!nativeFetch) { nativeFetch = window.fetch } if (!isFakeFetch(window.fetch)) { window.fetch = fakeFetchFactory.getFetch(); } fakeFetchFactory.use(config); }; export const disable = () => { window.fetch = nativeFetch; }; ================================================ FILE: src/interceptors/index.ts ================================================ import * as xhrInterceptor from './xhrInterceptor'; import * as fetchInterceptor from './fetchInterceptor'; export interface Interceptors { XMLHttpRequest: typeof xhrInterceptor; fetch: typeof fetchInterceptor; http?: any; https?: any; } export const interceptors: Interceptors = { XMLHttpRequest: xhrInterceptor, fetch: fetchInterceptor }; ================================================ FILE: src/interceptors/interceptorHelper.ts ================================================ import keys from 'lodash.keys'; import includes from 'lodash.includes'; import pathMatch from 'path-match'; import parseUrl from 'parse-url'; import queryString from 'query-string'; import { KakapoRequest } from '../Request'; import { KakapoResponse } from '../Response'; import { Database, DatabaseSchema } from '../Database'; export type RouterHandler = ( request: KakapoRequest, db: Database ) => KakapoResponse | any | Promise; export interface InterceptorConfig { host: string; routes: { [method: string]: { [path: string]: RouterHandler } }; db: Database | null; requestDelay: number; } export interface UrlDetails { handlers: any; pathname: string; fullpath: string; } const getRoute = ( { host }: InterceptorConfig, { handlers, pathname, fullpath }: UrlDetails ) => { const matchesPathname = (path: string) => pathMatch()(path)(pathname); const route = keys(handlers).reduce((result: string | undefined, key: string) => matchesPathname(key) ? key : result, undefined); const hasHost = includes(fullpath, host); return route && hasHost ? route : null; }; const extractUrl = ( { routes }: InterceptorConfig, url: string, method: string ) => ({ handlers: routes[method], pathname: parseUrl(url).pathname, fullpath: parseUrl(url).href }); export interface Interceptor { getDB(): Database | null; getDelay(): number; getHandler(url: string, method: string): RouterHandler | null; getParams(url: string, method: string): any; getQuery(url: string): any; } export const interceptorHelper = (config: InterceptorConfig): Interceptor => ({ getDB() { return config.db; }, getDelay() { return config.requestDelay; }, getHandler(url, method) { const extractedUrl = extractUrl(config, url, method); const route = getRoute(config, extractedUrl); return route ? extractedUrl.handlers[route] : null; }, getParams(url, method) { const extractedUrl = extractUrl(config, url, method); const matchesPathname = (path: string) => pathMatch()(path)(extractedUrl.pathname); const route = getRoute(config, extractedUrl); return route ? matchesPathname(route) : null; }, getQuery(url) { return queryString.parse(parseUrl(url).search); } }); ================================================ FILE: src/interceptors/xhrInterceptor.ts ================================================ import { KakapoResponse } from '../Response'; import { KakapoRequest } from '../Request'; import { Interceptor, InterceptorConfig, interceptorHelper } from './interceptorHelper'; import { canUseWindow } from '../utils'; import { DatabaseSchema } from '../Database'; type ProgressEventType = keyof XMLHttpRequestEventTargetEventMap; type ProgressEventHandler = ( event: XMLHttpRequestEventTargetEventMap[K] ) => any; type ProgressEventListener = | { handleEvent: ProgressEventHandler } | ProgressEventHandler; const hasHandleEvent = ( listener: ProgressEventListener ): listener is { handleEvent: ProgressEventHandler } => 'handleEvent' in listener; class FakeXMLHttpRequest { interceptors: Interceptor[]; constructor() { this.interceptors = []; } use(config: InterceptorConfig) { this.interceptors.push(interceptorHelper(config)); } shouldIntercept(method: string, url: string): boolean { return this.interceptors.some( interceptor => !!interceptor.getHandler(url, method) ); } static UNSENT = 0; static OPENED = 1; static HEADERS_RECEIVED = 2; static LOADING = 3; static DONE = 4; timeout: number | undefined; // withCredentials: boolean; // msCaching: string; _method: string | undefined; _url: string | undefined; open( method: string, url: string, async?: boolean, user?: string, password?: string ): void { this._method = method; this._url = url; this._readyState = FakeXMLHttpRequest.OPENED; } // responseBody: any; _status: number = 0; get status(): number { return this._status; } _readyState: number = FakeXMLHttpRequest.UNSENT; get readyState(): number { return this._readyState; } // responseXML: any; // responseURL: string; // statusText: string; _setReadyState(readyState: number): void { this._readyState = readyState; if (this.onreadystatechange) { this.onreadystatechange(new Event('readystatechange')); } } _response: any; get response(): any { return this._response; } get responseText(): string { return this.response; } responseType: | undefined | void | '' | 'arraybuffer' | 'blob' | 'document' | 'json' | 'text'; _requestHeaders: { [header: string]: string } = {}; setRequestHeader(header: string, value: string): void { this._requestHeaders[header] = value; } _responseHeaders: { [header: string]: string } = {}; // getAllResponseHeaders(): string; getResponseHeader(header: string): string { return this._responseHeaders[header]; } send(data?: any): void { const { _method: method, _url: url } = this; const interceptors = this.interceptors.filter( interceptor => url && method && !!interceptor.getHandler(url, method) ); if (interceptors.length > 0) { interceptors.forEach(interceptor => { if (url && method) { const handler = interceptor.getHandler(url, method); const db = interceptor.getDB(); if (handler && db) { const delay = interceptor.getDelay(); const request = new KakapoRequest({ params: interceptor.getParams(url, method), query: interceptor.getQuery(url), body: data, headers: this._requestHeaders }); // Wrapping handler into a promise to add promise support for free const responsePromise = Promise.resolve(handler(request, db)); responsePromise.then(result => { const response = KakapoResponse.wrap(result); if (delay) { setTimeout(() => this._handleResponse(response), delay); } else { this._handleResponse(response); } }); } } }); } else { this.nativeSend(data); } } _handleResponse({ code, headers, body }: KakapoResponse): void { const { 'content-type': contentType } = headers; this._status = code; this._responseHeaders = headers; if (this.responseType === 'blob') { if (body instanceof Blob) { this._response = body; } else { this._response = new Blob([body]); } } else { this._response = JSON.stringify(body); } this._setReadyState(FakeXMLHttpRequest.DONE); const loadEvent = new ProgressEvent('load'); if (this.onload) { this.onload(loadEvent); } this._listeners['load'].forEach(listener => { if (hasHandleEvent(listener)) { listener.handleEvent(loadEvent); } else { listener(loadEvent); } }); } // abort(): void; // msCachingEnabled(): boolean; // overrideMimeType(mime: string): void; _listeners: { [type in ProgressEventType]: ProgressEventListener[] } = { abort: [], error: [], load: [], loadend: [], loadstart: [], progress: [], timeout: [] }; addEventListener( type: ProgressEventType, listener: ProgressEventListener ): void { this._listeners[type].push(listener); } removeEventListener( type: ProgressEventType, listener: ProgressEventListener ): void { const index = this._listeners[type].indexOf(listener); if (index >= 0) { this._listeners[type].splice(index, 1); } } upload: XMLHttpRequestEventTarget = new (window as any).XMLHttpRequestEventTarget(); onabort: ProgressEventHandler<'abort'> | undefined; onerror: ProgressEventHandler<'error'> | undefined; onload: ProgressEventHandler<'load'> | undefined; onloadend: ProgressEventHandler<'loadend'> | undefined; onloadstart: ProgressEventHandler<'loadstart'> | undefined; onprogress: ProgressEventHandler<'progress'> | undefined; ontimeout: ProgressEventHandler<'timeout'> | undefined; onreadystatechange: ((ev: Event) => any) | undefined; nativeSend(data?: any): void { const request = new NativeXMLHttpRequest(); if (this.timeout) { request.timeout = this.timeout; } request.onload = () => { const headers = request .getAllResponseHeaders() .split('\r\n') .reduce((previous, current) => { const [header, value] = current.split(': '); return { ...previous, [header]: value }; }, {}); const response = new KakapoResponse( request.status, request.response, headers ); this._handleResponse(response); }; if (this._method && this._url) { request.open(this._method, this._url); request.send(data); } } } interface AddEventListenerOptions { capture?: boolean; once?: boolean; passive?: boolean; } class FakeXMLHttpRequestEventTarget { addEventListener( type: string, listener: Function, useCaptureOrOptions: boolean | AddEventListenerOptions = false ) { // do nothing for now } } let NativeXMLHttpRequest: typeof XMLHttpRequest; let NativeXMLHttpRequestEventTarget: typeof XMLHttpRequestEventTarget; export const enable = (config: InterceptorConfig) => { if (!canUseWindow) { throw new Error( `You're trying to use XHR interceptor in non-browser environment` ); } if (!NativeXMLHttpRequest || !NativeXMLHttpRequestEventTarget) { NativeXMLHttpRequest = XMLHttpRequest; NativeXMLHttpRequestEventTarget = XMLHttpRequestEventTarget; } (window as any).XMLHttpRequest = function () { const fakeXMLHttpRequest = new FakeXMLHttpRequest(); fakeXMLHttpRequest.use(config); return fakeXMLHttpRequest; }; (window as any).XMLHttpRequestEventTarget = FakeXMLHttpRequestEventTarget; }; export const disable = () => { (window as any).XMLHttpRequest = NativeXMLHttpRequest; (window as any).XMLHttpRequestEventTarget = NativeXMLHttpRequestEventTarget; }; ================================================ FILE: src/serializers/index.ts ================================================ export * from './json-api'; ================================================ FILE: src/serializers/json-api.ts ================================================ import pickBy from 'lodash.pickby'; // @TODO (zzarcon): Implement 'included' support after relationships export const JSONApiSerializer = (record: any, type: any = null) => { const id = record.id; const included: any[] = []; const relationships = {}; const serializedRecord = pickBy( record, (_value: any, key: string) => key !== 'id' ); return { data: { id, attributes: serializedRecord, relationships, type }, included }; }; ================================================ FILE: src/utils.ts ================================================ export function mapRequestInfoToUrlString(requestInfo: RequestInfo): string { if (requestInfo instanceof Request) { return requestInfo.url; } else { return requestInfo; } } export const canUseWindow = typeof window !== 'undefined'; ================================================ FILE: tsconfig.dist.json ================================================ { "extends": "./tsconfig.json", "compilerOptions": { "baseUrl": "./src" }, "include": [ "src/**/*", "typings" ] } ================================================ FILE: tsconfig.json ================================================ { "compilerOptions": { "strict": true, "noImplicitAny": true, "removeComments": true, "target": "es5", "lib": [ "dom", "es5", "scripthost", "es2015.collection", "es2015.symbol", "es2015.iterable", "es2015.promise" ], "esModuleInterop": true, "allowJs": false, "declaration": true, "outDir": "dist", "noEmitOnError": true }, "include": [ "src/**/*", "typings/**/*", "__tests__/**/*" ] } ================================================ FILE: typings/parse-url/index.d.ts ================================================ declare module 'parse-url'; ================================================ FILE: typings/path-match/index.d.ts ================================================ declare module 'path-match' ================================================ FILE: typings/query-string/index.d.ts ================================================ declare module 'query-string'; ================================================ FILE: webpack.config.js ================================================ module.exports = { entry: './src', output: { path: './lib', filename: 'kakapo.js', publicPath: '/' }, module: { rules: [ { test: /\.tsx?$/, loader: 'ts-loader', include: __dirname, exclude: /node_modules/ }, { test: /\.json$/, loader: 'json-loader' } ] } }; ================================================ FILE: webpack.perf.config.js ================================================ const path = require('path'); module.exports = { mode: 'development', entry: path.resolve(__dirname, './perf/index.js'), output: { filename: './perf/dist/bundle.js', }, resolve: { extensions: [".js", ".jsx", ".ts", ".tsx"] }, module: { rules: [ { test: /\.tsx?$/, loader: 'ts-loader', include: __dirname, exclude: [/node_modules/] }, ] } };