├── .babelrc ├── .eslintignore ├── examples ├── todolist │ ├── src │ │ ├── data │ │ │ ├── TodoItem.js │ │ │ ├── const.js │ │ │ └── Todos.js │ │ ├── components │ │ │ └── Todo.vue │ │ └── App.vue │ ├── app.js │ └── index.html ├── twobuttons │ ├── app.js │ ├── index.html │ └── src │ │ └── components │ │ ├── App.vue │ │ ├── FireActions.vue │ │ └── GetResults.vue ├── index.css ├── index.html ├── server.js └── webpack.config.js ├── test ├── unit │ ├── setup.spec.js │ ├── index.spec.js │ └── store.spec.js └── e2e │ ├── runner.js │ ├── specs │ ├── twobuttons.js │ └── todolist.js │ └── nightwatch.config.js ├── .flowconfig ├── src ├── index.js ├── util.js ├── mixin.js └── store.js ├── .gitignore ├── flow-typed └── npm │ ├── flow-bin_v0.x.x.js │ ├── todomvc-app-css_vx.x.x.js │ ├── loader-utils_vx.x.x.js │ ├── babel-preset-flow_vx.x.x.js │ ├── babel-preset-es2015_vx.x.x.js │ ├── eslint-config-vue_vx.x.x.js │ ├── eslint-plugin-vue_vx.x.x.js │ ├── babel-istanbul-loader_vx.x.x.js │ ├── karma-sourcemap-loader_vx.x.x.js │ ├── rimraf_vx.x.x.js │ ├── vue-template-compiler_vx.x.x.js │ ├── babel-plugin-add-module-exports_vx.x.x.js │ ├── karma-webpack_vx.x.x.js │ ├── lodash-webpack-plugin_vx.x.x.js │ ├── karma-jasmine_vx.x.x.js │ ├── webpack-dev-middleware_vx.x.x.js │ ├── karma-chrome-launcher_vx.x.x.js │ ├── babel-loader_vx.x.x.js │ ├── eslint-config-airbnb_vx.x.x.js │ ├── karma-coverage_vx.x.x.js │ ├── babel-eslint_vx.x.x.js │ ├── css-loader_vx.x.x.js │ ├── babel-cli_vx.x.x.js │ ├── webpack-hot-middleware_vx.x.x.js │ ├── vue-loader_vx.x.x.js │ ├── jasmine-core_vx.x.x.js │ ├── express_v4.x.x.js │ ├── babel-core_vx.x.x.js │ ├── karma_vx.x.x.js │ ├── babel-istanbul_vx.x.x.js │ ├── eslint-plugin-import_vx.x.x.js │ ├── eslint-plugin-react_vx.x.x.js │ └── lodash_v4.x.x.js ├── tests.webpack.js ├── .editorconfig ├── .travis.yml ├── tools ├── webpack.config.dev.js ├── webpack.config.prd.js └── webpack.config.base.js ├── .eslintrc.json ├── karma.config.js ├── package.json └── README.md /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["flow", "es2015"] 3 | } 4 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | build/* 2 | dist/* 3 | node_modules/* 4 | **/node_modules/* 5 | tools/* 6 | tests.webpack.js 7 | -------------------------------------------------------------------------------- /examples/todolist/src/data/TodoItem.js: -------------------------------------------------------------------------------- 1 | export default (text = 'empty', done = false) => { 2 | return { 3 | text, 4 | done 5 | } 6 | } -------------------------------------------------------------------------------- /test/unit/setup.spec.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue/dist/vue.common'; 2 | import Vuez from '../../src/index'; 3 | 4 | export default () => { 5 | Vue.use(Vuez); 6 | }; 7 | -------------------------------------------------------------------------------- /.flowconfig: -------------------------------------------------------------------------------- 1 | [ignore] 2 | .*/node_modules/.* 3 | .*/test/.* 4 | .*/dist/.* 5 | [include] 6 | .*/src 7 | [libs] 8 | flow-typed 9 | [options] 10 | module.file_ext=.js 11 | -------------------------------------------------------------------------------- /examples/todolist/src/data/const.js: -------------------------------------------------------------------------------- 1 | export const STORAGE_KEY = 'todos-vuez'; 2 | export const TODOS_ACTION = 'todos-action'; 3 | export const DELETE_TODO_ACTION = 'delete-todos-action'; -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by fengchaoyi on 2017/4/23. 3 | */ 4 | 5 | import { Store, install } from './store'; 6 | 7 | export default { 8 | Store, 9 | install, 10 | }; 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | TODO.md 4 | lib 5 | */build.js 6 | *.log 7 | test/e2e/reports 8 | test/e2e/screenshots 9 | .idea 10 | dist 11 | bower_components 12 | coverage 13 | npm-debug.log 14 | wiki/* 15 | -------------------------------------------------------------------------------- /flow-typed/npm/flow-bin_v0.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 6a5610678d4b01e13bbfbbc62bdaf583 2 | // flow-typed version: 3817bc6980/flow-bin_v0.x.x/flow_>=v0.25.x 3 | 4 | declare module "flow-bin" { 5 | declare module.exports: string; 6 | } 7 | -------------------------------------------------------------------------------- /tests.webpack.js: -------------------------------------------------------------------------------- 1 | var testsContext = require.context('./test', true, /\.spec.js$/); 2 | testsContext.keys().forEach(testsContext); 3 | 4 | var srcContext = require.context('./src', true, /^((?!__tests__).)*.js$/); 5 | srcContext.keys().forEach(srcContext); 6 | -------------------------------------------------------------------------------- /examples/todolist/app.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import App from './src/App.vue'; 3 | import Vuez from 'vuez'; 4 | 5 | Vue.use(Vuez); 6 | const store = new Vuez.Store(); 7 | 8 | new Vue({ 9 | store: store, 10 | el: '#app', 11 | render: h => h(App) 12 | }); -------------------------------------------------------------------------------- /examples/twobuttons/app.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue'; 2 | import App from './src/components/App.vue'; 3 | import Vuez from 'vuez'; 4 | 5 | Vue.use(Vuez); 6 | const store = new Vuez.Store(); 7 | 8 | new Vue({ 9 | store: store, 10 | el: '#app', 11 | render: h => h(App) 12 | }); -------------------------------------------------------------------------------- /examples/todolist/src/data/Todos.js: -------------------------------------------------------------------------------- 1 | import {STORAGE_KEY} from './const'; 2 | 3 | // for testing 4 | if (navigator.userAgent.indexOf('PhantomJS') > -1) { 5 | window.localStorage.clear() 6 | } 7 | 8 | export default ()=>( 9 | JSON.parse(window.localStorage.getItem(STORAGE_KEY) || '[]') 10 | ); -------------------------------------------------------------------------------- /examples/todolist/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | vuez todo example 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /examples/twobuttons/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | vuez todo example 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | [*] 2 | charset=utf-8 3 | end_of_line=lf 4 | insert_final_newline=false 5 | indent_style=space 6 | indent_size=4 7 | 8 | [{.babelrc,.stylelintrc,.eslintrc,jest.config,*.json,*.jsb3,*.jsb2,*.bowerrc}] 9 | indent_style=space 10 | indent_size=2 11 | 12 | [{.analysis_options,*.yml,*.yaml}] 13 | indent_style=space 14 | indent_size=2 15 | 16 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - 5.0 4 | - 6.0 5 | - 7.0 6 | - stable 7 | #script: node_modules/karma/bin/karma start ./karma.conf.js --singleRun 8 | before_install: 9 | - export CHROME_BIN=chromium-browser 10 | - export DISPLAY=:99.0 11 | - sh -e /etc/init.d/xvfb start 12 | 13 | branches: 14 | only: 15 | - master 16 | - develop -------------------------------------------------------------------------------- /examples/index.css: -------------------------------------------------------------------------------- 1 | html, body { 2 | font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; 3 | color: #2c3e50; 4 | } 5 | 6 | ul { 7 | line-height: 1.5em; 8 | padding-left: 1.5em; 9 | } 10 | 11 | a { 12 | color: #7f8c8d; 13 | text-decoration: none; 14 | } 15 | 16 | a:hover { 17 | color: #4fc08d; 18 | } 19 | -------------------------------------------------------------------------------- /tools/webpack.config.dev.js: -------------------------------------------------------------------------------- 1 | var webpack = require('webpack'); 2 | var baseConfig = require('./webpack.config.base.js'); 3 | 4 | var config = Object.create(baseConfig); 5 | config.devtool = 'eval-source-map'; 6 | config.plugins = [ 7 | new webpack.optimize.OccurenceOrderPlugin(), 8 | new webpack.DefinePlugin({ 9 | 'process.env.NODE_ENV': JSON.stringify('development'), 10 | }), 11 | ]; 12 | 13 | module.exports = config; 14 | -------------------------------------------------------------------------------- /examples/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Examples 6 | 7 | 8 | 9 |

Vuez Examples

10 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /test/unit/index.spec.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | /** 3 | * Created by fengchaoyi on 2017/4/23. 4 | */ 5 | import Vue from 'vue/dist/vue.common'; 6 | // import Vuez from '../../src/index'; 7 | import setup from './setup.spec'; 8 | 9 | describe('index', () => { 10 | beforeAll(() => { 11 | setup(); 12 | }); 13 | 14 | it('should detect vue', () => { 15 | expect(Vue).not.toBe(undefined); 16 | }); 17 | }); 18 | -------------------------------------------------------------------------------- /examples/twobuttons/src/components/App.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 21 | -------------------------------------------------------------------------------- /tools/webpack.config.prd.js: -------------------------------------------------------------------------------- 1 | var webpack = require('webpack'); 2 | var baseConfig = require('./webpack.config.base.js'); 3 | 4 | var config = Object.create(baseConfig); 5 | config.devtool = 'source-map'; 6 | config.plugins = [ 7 | new webpack.optimize.OccurenceOrderPlugin(), 8 | new webpack.DefinePlugin({ 9 | 'process.env.NODE_ENV': JSON.stringify('production'), 10 | }), 11 | new webpack.optimize.UglifyJsPlugin({ 12 | compressor: {warnings: false}, 13 | }), 14 | new webpack.optimize.DedupePlugin() 15 | ]; 16 | 17 | module.exports = config; 18 | 19 | -------------------------------------------------------------------------------- /flow-typed/npm/todomvc-app-css_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 1cb67ac834e030de0781bc2a9cd7e94e 2 | // flow-typed version: <>/todomvc-app-css_v^2.1.0/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'todomvc-app-css' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'todomvc-app-css' { 17 | declare module.exports: any; 18 | } 19 | -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | // http://eslint.org/docs/user-guide/configuring 2 | 3 | { 4 | "root": true, 5 | "parser": "babel-eslint", 6 | "parserOptions": { 7 | "sourceType": "module" 8 | }, 9 | "extends": "airbnb", 10 | // add your custom rules here 11 | "rules": { 12 | "indent": [2, 4], 13 | // don"t require .vue extension when importing 14 | "import/extensions": ["error", "always", { 15 | "js": "never", 16 | "vue": "never" 17 | }], 18 | // allow optionalDependencies 19 | "import/no-extraneous-dependencies": ["error", { 20 | "optionalDependencies": ["test/unit/index.js"] 21 | }] 22 | // allow debugger during development 23 | // "no-debugger": process.env.NODE_ENV === "production" ? 2 : 0 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /examples/server.js: -------------------------------------------------------------------------------- 1 | const express = require('express') 2 | const webpack = require('webpack') 3 | const webpackDevMiddleware = require('webpack-dev-middleware') 4 | const webpackHotMiddleware = require('webpack-hot-middleware') 5 | const WebpackConfig = require('./webpack.config') 6 | 7 | const app = express() 8 | const compiler = webpack(WebpackConfig) 9 | 10 | app.use(webpackDevMiddleware(compiler, { 11 | publicPath: '/__build__/', 12 | stats: { 13 | colors: true, 14 | chunks: false 15 | } 16 | })) 17 | 18 | app.use(webpackHotMiddleware(compiler)) 19 | 20 | app.use(express.static(__dirname)) 21 | 22 | const port = process.env.PORT || 8080 23 | module.exports = app.listen(port, () => { 24 | console.log(`Server listening on http://localhost:${port}, Ctrl+C to stop`) 25 | }) 26 | -------------------------------------------------------------------------------- /tools/webpack.config.base.js: -------------------------------------------------------------------------------- 1 | var LodashModuleReplacementPlugin = require('lodash-webpack-plugin'); 2 | const NODE_ENV = process.env.NODE_ENV; 3 | const plugins = []; 4 | if (NODE_ENV === 'production') { 5 | plugins.push(new LodashModuleReplacementPlugin); 6 | } 7 | 8 | module.exports = { 9 | module: { 10 | loaders: [{ 11 | test: /\.js$/, 12 | exclude: /(bower_components|node_modules)/, 13 | loader: 'babel', 14 | options: { 15 | plugins: NODE_ENV === 'production' ? ['lodash'] : [], 16 | presets: ['es2015'], 17 | }, 18 | }], 19 | }, 20 | plugins, 21 | output: { 22 | libraryTarget: 'umd', 23 | library: 'vuez', 24 | }, 25 | resolve: { 26 | extensions: [ 27 | '', 28 | '.js', 29 | ], 30 | }, 31 | }; 32 | -------------------------------------------------------------------------------- /src/util.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | export function assert(condition: ?Object, msg: string) { 4 | if (!condition) throw new Error(`[vuez assert error] ${msg}`); 5 | } 6 | 7 | export function isSameDataType(value1: any, value2: any): boolean { 8 | // considering these data types: 9 | // Numbers, Strings, Booleans, Objects, Functions, Arrays, RegExp, null, undefined 10 | 11 | // using totype function from post: https://javascriptweblog.wordpress.com/2011/08/08/fixing-the-javascript-typeof-operator/ 12 | const toType = (obj: any): string => { 13 | const typeStringArray = Object.prototype.toString.call(obj).match(/\s([a-zA-Z]+)/); 14 | if (typeStringArray) { 15 | const second = typeStringArray[1]; 16 | return second.toLowerCase(); 17 | } 18 | return 'error!'; 19 | }; 20 | return toType(value1) === toType(value2); 21 | } 22 | -------------------------------------------------------------------------------- /test/e2e/runner.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-unused-expressions,no-var */ 2 | const spawn = require('cross-spawn'); 3 | 4 | var args = process.argv.slice(2); 5 | 6 | const server = args.indexOf('--dev') > -1 7 | ? null 8 | : require('../../examples/server'); 9 | 10 | if (args.indexOf('--config') === -1) { 11 | args = args.concat(['--config', 'test/e2e/nightwatch.config.js']); 12 | } 13 | if (args.indexOf('--env') === -1) { 14 | args = args.concat(['--env', 'phantomjs']); 15 | } 16 | const i = args.indexOf('--test'); 17 | if (i > -1) { 18 | args[i + 1] = `test/e2e/specs/${args[i + 1]}`; 19 | } 20 | if (args.indexOf('phantomjs') > -1) { 21 | process.env.PHANTOMJS = true; 22 | } 23 | 24 | const runner = spawn('./node_modules/.bin/nightwatch', args, { 25 | stdio: 'inherit', 26 | }); 27 | 28 | runner.on('exit', (code) => { 29 | server && server.close(); 30 | process.exit(code); 31 | }); 32 | 33 | runner.on('error', (err) => { 34 | server && server.close(); 35 | throw err; 36 | }); 37 | -------------------------------------------------------------------------------- /examples/twobuttons/src/components/FireActions.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 30 | -------------------------------------------------------------------------------- /flow-typed/npm/loader-utils_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: bce61290e00d87e353c2811a18fbad37 2 | // flow-typed version: <>/loader-utils_v^0.2.12/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'loader-utils' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'loader-utils' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | 26 | 27 | // Filename aliases 28 | declare module 'loader-utils/index' { 29 | declare module.exports: $Exports<'loader-utils'>; 30 | } 31 | declare module 'loader-utils/index.js' { 32 | declare module.exports: $Exports<'loader-utils'>; 33 | } 34 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-preset-flow_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: ecc5c7711455066a3b2cda7e62a4361a 2 | // flow-typed version: <>/babel-preset-flow_v^6.23.0/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-preset-flow' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-preset-flow' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-preset-flow/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-preset-flow/lib/index.js' { 31 | declare module.exports: $Exports<'babel-preset-flow/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /examples/twobuttons/src/components/GetResults.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 31 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-preset-es2015_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 61e55149effe794ae5a90da469a75e3b 2 | // flow-typed version: <>/babel-preset-es2015_v^6.24.1/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-preset-es2015' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-preset-es2015' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-preset-es2015/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'babel-preset-es2015/lib/index.js' { 31 | declare module.exports: $Exports<'babel-preset-es2015/lib/index'>; 32 | } 33 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-config-vue_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 08f87274ec0560f667e2f5d0df6df02b 2 | // flow-typed version: <>/eslint-config-vue_v^2.0.2/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-config-vue' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-config-vue' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | 26 | 27 | // Filename aliases 28 | declare module 'eslint-config-vue/index' { 29 | declare module.exports: $Exports<'eslint-config-vue'>; 30 | } 31 | declare module 'eslint-config-vue/index.js' { 32 | declare module.exports: $Exports<'eslint-config-vue'>; 33 | } 34 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-plugin-vue_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: c75d32e14bbe4c2a0ba9de47a1b8dee0 2 | // flow-typed version: <>/eslint-plugin-vue_v^2.0.1/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-plugin-vue' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-plugin-vue' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | 26 | 27 | // Filename aliases 28 | declare module 'eslint-plugin-vue/index' { 29 | declare module.exports: $Exports<'eslint-plugin-vue'>; 30 | } 31 | declare module 'eslint-plugin-vue/index.js' { 32 | declare module.exports: $Exports<'eslint-plugin-vue'>; 33 | } 34 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-istanbul-loader_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 50dd067e452b5641d926b6c09939ffb4 2 | // flow-typed version: <>/babel-istanbul-loader_v0.0.1/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-istanbul-loader' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-istanbul-loader' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | 26 | 27 | // Filename aliases 28 | declare module 'babel-istanbul-loader/index' { 29 | declare module.exports: $Exports<'babel-istanbul-loader'>; 30 | } 31 | declare module 'babel-istanbul-loader/index.js' { 32 | declare module.exports: $Exports<'babel-istanbul-loader'>; 33 | } 34 | -------------------------------------------------------------------------------- /flow-typed/npm/karma-sourcemap-loader_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 168986939836a4ad1d52f083fdf07586 2 | // flow-typed version: <>/karma-sourcemap-loader_v^0.3.7/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'karma-sourcemap-loader' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'karma-sourcemap-loader' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | 26 | 27 | // Filename aliases 28 | declare module 'karma-sourcemap-loader/index' { 29 | declare module.exports: $Exports<'karma-sourcemap-loader'>; 30 | } 31 | declare module 'karma-sourcemap-loader/index.js' { 32 | declare module.exports: $Exports<'karma-sourcemap-loader'>; 33 | } 34 | -------------------------------------------------------------------------------- /flow-typed/npm/rimraf_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 319a871ea75dbf41749ddd82beb05831 2 | // flow-typed version: <>/rimraf_v^2.5.0/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'rimraf' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'rimraf' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'rimraf/bin' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'rimraf/rimraf' { 30 | declare module.exports: any; 31 | } 32 | 33 | // Filename aliases 34 | declare module 'rimraf/bin.js' { 35 | declare module.exports: $Exports<'rimraf/bin'>; 36 | } 37 | declare module 'rimraf/rimraf.js' { 38 | declare module.exports: $Exports<'rimraf/rimraf'>; 39 | } 40 | -------------------------------------------------------------------------------- /flow-typed/npm/vue-template-compiler_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 528c49415afd8af418c6b6f1abee6498 2 | // flow-typed version: <>/vue-template-compiler_v^2.1.10/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'vue-template-compiler' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'vue-template-compiler' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'vue-template-compiler/build' { 26 | declare module.exports: any; 27 | } 28 | 29 | // Filename aliases 30 | declare module 'vue-template-compiler/build.js' { 31 | declare module.exports: $Exports<'vue-template-compiler/build'>; 32 | } 33 | declare module 'vue-template-compiler/index' { 34 | declare module.exports: $Exports<'vue-template-compiler'>; 35 | } 36 | declare module 'vue-template-compiler/index.js' { 37 | declare module.exports: $Exports<'vue-template-compiler'>; 38 | } 39 | -------------------------------------------------------------------------------- /test/e2e/specs/twobuttons.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | 3 | module.exports = { 4 | twobuttons(browser) { 5 | browser 6 | .url('http://localhost:8080/twobuttons/') 7 | .waitForElementVisible('.twobuttons', 1000) 8 | .assert.containsText('.twobuttons .result1', '') 9 | .assert.containsText('.twobuttons .result2', ''); 10 | 11 | browser.enterValue('.twobuttons-input', 'e2e-test'); 12 | 13 | browser.click('.twobuttons-btn1'); 14 | browser.expect.element('.twobuttons .result2').text.to.equal(''); 15 | browser.expect.element('.twobuttons .result1').text.to.not.equal(''); 16 | 17 | browser.click('.twobuttons-btn2'); 18 | browser.expect.element('.twobuttons .result2').text.to.not.equal(''); 19 | browser.expect.element('.twobuttons .result1').text.to.not.equal(''); 20 | 21 | browser.enterValue('.twobuttons-input', 'hello world!'); 22 | 23 | browser.click('.twobuttons-btn1') 24 | .assert.containsText('.twobuttons .result1', 'hello world!'); 25 | 26 | browser.click('.twobuttons-btn2') 27 | .assert.containsText('.twobuttons .result2', 'hello world!') 28 | .assert.containsText('.twobuttons .result1', 'hello world!'); 29 | 30 | browser.end(); 31 | }, 32 | }; 33 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-plugin-add-module-exports_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: ede2c308465f95b19cac1b38e5f5ee59 2 | // flow-typed version: <>/babel-plugin-add-module-exports_v^0.1.2/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-plugin-add-module-exports' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-plugin-add-module-exports' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-plugin-add-module-exports/changelog' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-plugin-add-module-exports/lib/index' { 30 | declare module.exports: any; 31 | } 32 | 33 | // Filename aliases 34 | declare module 'babel-plugin-add-module-exports/changelog.js' { 35 | declare module.exports: $Exports<'babel-plugin-add-module-exports/changelog'>; 36 | } 37 | declare module 'babel-plugin-add-module-exports/lib/index.js' { 38 | declare module.exports: $Exports<'babel-plugin-add-module-exports/lib/index'>; 39 | } 40 | -------------------------------------------------------------------------------- /flow-typed/npm/karma-webpack_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 0294198e805479189b225cd5826af15c 2 | // flow-typed version: <>/karma-webpack_v^1.7.0/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'karma-webpack' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'karma-webpack' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'karma-webpack/lib/karma-webpack' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'karma-webpack/lib/mocha-env-loader' { 30 | declare module.exports: any; 31 | } 32 | 33 | // Filename aliases 34 | declare module 'karma-webpack/index' { 35 | declare module.exports: $Exports<'karma-webpack'>; 36 | } 37 | declare module 'karma-webpack/index.js' { 38 | declare module.exports: $Exports<'karma-webpack'>; 39 | } 40 | declare module 'karma-webpack/lib/karma-webpack.js' { 41 | declare module.exports: $Exports<'karma-webpack/lib/karma-webpack'>; 42 | } 43 | declare module 'karma-webpack/lib/mocha-env-loader.js' { 44 | declare module.exports: $Exports<'karma-webpack/lib/mocha-env-loader'>; 45 | } 46 | -------------------------------------------------------------------------------- /examples/webpack.config.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs') 2 | const path = require('path') 3 | const webpack = require('webpack') 4 | 5 | module.exports = { 6 | 7 | devtool: 'inline-source-map', 8 | 9 | entry: fs.readdirSync(__dirname).reduce((entries, dir) => { 10 | const fullDir = path.join(__dirname, dir) 11 | const entry = path.join(fullDir, 'app.js') 12 | if (fs.statSync(fullDir).isDirectory() && fs.existsSync(entry)) { 13 | entries[dir] = ['webpack-hot-middleware/client', entry] 14 | } 15 | 16 | return entries 17 | }, {}), 18 | 19 | output: { 20 | path: path.join(__dirname, '__build__'), 21 | filename: '[name].js', 22 | chunkFilename: '[id].chunk.js', 23 | publicPath: '/__build__/' 24 | }, 25 | 26 | module: { 27 | loaders: [{ 28 | test: /\.js$/, 29 | exclude: /(bower_components|node_modules)/, 30 | loader: 'babel', 31 | }, 32 | { 33 | test: /\.vue$/, 34 | loader: 'vue-loader', 35 | }], 36 | }, 37 | 38 | resolve: { 39 | alias: { 40 | vuez: path.resolve(__dirname, '../src/index.js') 41 | } 42 | }, 43 | 44 | plugins: [ 45 | new webpack.optimize.CommonsChunkPlugin({ 46 | name: 'shared', 47 | filename: 'shared.js' 48 | }), 49 | new webpack.DefinePlugin({ 50 | 'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || 'development') 51 | }), 52 | new webpack.HotModuleReplacementPlugin(), 53 | // new webpack.NoEmitOnErrorsPlugin() 54 | ] 55 | 56 | } 57 | -------------------------------------------------------------------------------- /test/e2e/nightwatch.config.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable global-require */ 2 | // http://nightwatchjs.org/guide#settings-file 3 | module.exports = { 4 | src_folders: ['test/e2e/specs'], 5 | output_folder: 'test/e2e/reports', 6 | custom_commands_path: ['node_modules/nightwatch-helpers/commands'], 7 | custom_assertions_path: ['node_modules/nightwatch-helpers/assertions'], 8 | 9 | selenium: { 10 | start_process: true, 11 | server_path: require('selenium-server').path, 12 | host: '127.0.0.1', 13 | port: 4444, 14 | cli_args: { 15 | 'webdriver.chrome.driver': require('chromedriver').path, 16 | }, 17 | }, 18 | 19 | test_settings: { 20 | default: { 21 | selenium_port: 4444, 22 | selenium_host: 'localhost', 23 | silent: true, 24 | screenshots: { 25 | enabled: true, 26 | on_failure: true, 27 | on_error: false, 28 | path: 'test/e2e/screenshots', 29 | }, 30 | }, 31 | 32 | chrome: { 33 | desiredCapabilities: { 34 | browserName: 'chrome', 35 | javascriptEnabled: true, 36 | acceptSslCerts: true, 37 | }, 38 | }, 39 | 40 | phantomjs: { 41 | desiredCapabilities: { 42 | browserName: 'phantomjs', 43 | javascriptEnabled: true, 44 | acceptSslCerts: true, 45 | }, 46 | }, 47 | }, 48 | }; 49 | -------------------------------------------------------------------------------- /flow-typed/npm/lodash-webpack-plugin_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: d678d00a35cf3338d482a5bf8f346a5d 2 | // flow-typed version: <>/lodash-webpack-plugin_v^0.11.3/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'lodash-webpack-plugin' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'lodash-webpack-plugin' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'lodash-webpack-plugin/lib/index' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'lodash-webpack-plugin/lib/listing' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'lodash-webpack-plugin/lib/mapping' { 34 | declare module.exports: any; 35 | } 36 | 37 | // Filename aliases 38 | declare module 'lodash-webpack-plugin/lib/index.js' { 39 | declare module.exports: $Exports<'lodash-webpack-plugin/lib/index'>; 40 | } 41 | declare module 'lodash-webpack-plugin/lib/listing.js' { 42 | declare module.exports: $Exports<'lodash-webpack-plugin/lib/listing'>; 43 | } 44 | declare module 'lodash-webpack-plugin/lib/mapping.js' { 45 | declare module.exports: $Exports<'lodash-webpack-plugin/lib/mapping'>; 46 | } 47 | -------------------------------------------------------------------------------- /flow-typed/npm/karma-jasmine_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 5c1b65bdbd420c2b4d6069f2ee99ce00 2 | // flow-typed version: <>/karma-jasmine_v^0.3.6/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'karma-jasmine' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'karma-jasmine' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'karma-jasmine/gruntfile' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'karma-jasmine/lib/adapter' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'karma-jasmine/lib/boot' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'karma-jasmine/lib/index' { 38 | declare module.exports: any; 39 | } 40 | 41 | // Filename aliases 42 | declare module 'karma-jasmine/gruntfile.js' { 43 | declare module.exports: $Exports<'karma-jasmine/gruntfile'>; 44 | } 45 | declare module 'karma-jasmine/lib/adapter.js' { 46 | declare module.exports: $Exports<'karma-jasmine/lib/adapter'>; 47 | } 48 | declare module 'karma-jasmine/lib/boot.js' { 49 | declare module.exports: $Exports<'karma-jasmine/lib/boot'>; 50 | } 51 | declare module 'karma-jasmine/lib/index.js' { 52 | declare module.exports: $Exports<'karma-jasmine/lib/index'>; 53 | } 54 | -------------------------------------------------------------------------------- /flow-typed/npm/webpack-dev-middleware_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: a05b2299bae5ea4876eadc0c19f6c3c9 2 | // flow-typed version: <>/webpack-dev-middleware_v^1.10.0/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'webpack-dev-middleware' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'webpack-dev-middleware' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'webpack-dev-middleware/lib/GetFilenameFromUrl' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'webpack-dev-middleware/lib/PathJoin' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'webpack-dev-middleware/lib/Shared' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'webpack-dev-middleware/middleware' { 38 | declare module.exports: any; 39 | } 40 | 41 | // Filename aliases 42 | declare module 'webpack-dev-middleware/lib/GetFilenameFromUrl.js' { 43 | declare module.exports: $Exports<'webpack-dev-middleware/lib/GetFilenameFromUrl'>; 44 | } 45 | declare module 'webpack-dev-middleware/lib/PathJoin.js' { 46 | declare module.exports: $Exports<'webpack-dev-middleware/lib/PathJoin'>; 47 | } 48 | declare module 'webpack-dev-middleware/lib/Shared.js' { 49 | declare module.exports: $Exports<'webpack-dev-middleware/lib/Shared'>; 50 | } 51 | declare module 'webpack-dev-middleware/middleware.js' { 52 | declare module.exports: $Exports<'webpack-dev-middleware/middleware'>; 53 | } 54 | -------------------------------------------------------------------------------- /karma.config.js: -------------------------------------------------------------------------------- 1 | var path = require('path'); 2 | 3 | var browsers = ['Chrome']; 4 | // trvis env 5 | 6 | if (process.env.TRAVIS) { 7 | browsers = ['Chrome_travis_ci']; 8 | } 9 | 10 | module.exports = function (config) { 11 | config.set({ 12 | browsers: browsers, 13 | // custom launchers 14 | customLaunchers: { 15 | Chrome_travis_ci: { 16 | base: 'Chrome', 17 | flags: ['--no-sandbox'] 18 | } 19 | }, 20 | coverageReporter: { 21 | reporters: [ 22 | {type: 'html', subdir: 'html'}, 23 | {type: 'lcovonly', subdir: '.'}, 24 | ], 25 | }, 26 | files: [ 27 | 'tests.webpack.js', 28 | ], 29 | frameworks: [ 30 | 'jasmine', 31 | ], 32 | preprocessors: { 33 | 'tests.webpack.js': ['webpack', 'sourcemap'], 34 | }, 35 | reporters: ['progress', 'coverage'], 36 | webpack: { 37 | cache: true, 38 | devtool: 'inline-source-map', 39 | module: { 40 | preLoaders: [ 41 | { 42 | test: /\.spec.js$/, 43 | include: /test/, 44 | exclude: /(bower_components|node_modules)/, 45 | loader: 'babel', 46 | query: { 47 | cacheDirectory: true, 48 | }, 49 | }, 50 | { 51 | test: /\.js?$/, 52 | include: /src/, 53 | exclude: /(node_modules|bower_components|__tests__)/, 54 | loader: 'babel-istanbul', 55 | query: { 56 | cacheDirectory: true, 57 | }, 58 | }, 59 | ], 60 | loaders: [ 61 | { 62 | test: /\.js$/, 63 | include: path.resolve(__dirname, '../src'), 64 | exclude: /(bower_components|node_modules|__tests__)/, 65 | loader: 'babel', 66 | query: { 67 | cacheDirectory: true, 68 | }, 69 | }, 70 | ], 71 | }, 72 | }, 73 | }); 74 | }; 75 | -------------------------------------------------------------------------------- /src/mixin.js: -------------------------------------------------------------------------------- 1 | // @flow 2 | 3 | /* eslint-disable no-underscore-dangle */ 4 | import { toNumber, indexOf } from 'lodash'; 5 | // import toNumber from 'lodash/toNumber'; 6 | // import indexOf from 'lodash/indexOf'; 7 | 8 | function initHook() { 9 | const options = this.$options; 10 | // store injection 11 | if (options.store) { 12 | this.$store = options.store; 13 | } else if (options.parent && options.parent.$store) { 14 | // use parent Vue component's $store 15 | this.$store = options.parent.$store; 16 | } 17 | } 18 | 19 | // Apply a mixin globally, which affects every Vue instance created afterwards. 20 | export default function (Vue: Object) { 21 | const version: number = toNumber(Vue.version.split('.')[0]); 22 | const lifecycleHooks: Array = Vue.config._lifecycleHooks; 23 | 24 | if (version >= 2) { 25 | if (lifecycleHooks) { 26 | // vue 2.x 27 | if (indexOf(lifecycleHooks, 'init') < 0) { 28 | // use beforeCreate hook 29 | Vue.mixin({ 30 | beforeCreate: initHook, 31 | }); 32 | } else { 33 | // use init hook 34 | Vue.mixin({ 35 | init: initHook, 36 | }); 37 | } 38 | } 39 | } else if (version < 2) { 40 | // vue 1.x 41 | const vueOldInit = Vue.prototype._init; 42 | // eslint-disable-next-line no-param-reassign 43 | Vue.prototype._init = function (options) { 44 | const newOptions = options || {}; 45 | if (newOptions.init) { 46 | newOptions.init = [initHook].concat(newOptions.init); 47 | } else { 48 | newOptions.init = initHook; 49 | } 50 | vueOldInit.call(this, newOptions); 51 | }; 52 | } else { 53 | console.error('[vuez] Vue version not recoginized, please commit an issue on Github!'); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /flow-typed/npm/karma-chrome-launcher_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 10a10811bc73d5bf112292730588ff88 2 | // flow-typed version: <>/karma-chrome-launcher_v^0.2.2/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'karma-chrome-launcher' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'karma-chrome-launcher' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'karma-chrome-launcher/examples/simple/index.spec' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'karma-chrome-launcher/examples/simple/karma.conf' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'karma-chrome-launcher/gruntfile' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'karma-chrome-launcher/test/jsflags.spec' { 38 | declare module.exports: any; 39 | } 40 | 41 | // Filename aliases 42 | declare module 'karma-chrome-launcher/examples/simple/index.spec.js' { 43 | declare module.exports: $Exports<'karma-chrome-launcher/examples/simple/index.spec'>; 44 | } 45 | declare module 'karma-chrome-launcher/examples/simple/karma.conf.js' { 46 | declare module.exports: $Exports<'karma-chrome-launcher/examples/simple/karma.conf'>; 47 | } 48 | declare module 'karma-chrome-launcher/gruntfile.js' { 49 | declare module.exports: $Exports<'karma-chrome-launcher/gruntfile'>; 50 | } 51 | declare module 'karma-chrome-launcher/index' { 52 | declare module.exports: $Exports<'karma-chrome-launcher'>; 53 | } 54 | declare module 'karma-chrome-launcher/index.js' { 55 | declare module.exports: $Exports<'karma-chrome-launcher'>; 56 | } 57 | declare module 'karma-chrome-launcher/test/jsflags.spec.js' { 58 | declare module.exports: $Exports<'karma-chrome-launcher/test/jsflags.spec'>; 59 | } 60 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-loader_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 0704a662d7753659c8f764d8f2aa441b 2 | // flow-typed version: <>/babel-loader_v^6.4.1/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-loader' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-loader' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-loader/lib/fs-cache' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-loader/lib/index' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'babel-loader/lib/resolve-rc' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'babel-loader/lib/utils/exists' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'babel-loader/lib/utils/read' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'babel-loader/lib/utils/relative' { 46 | declare module.exports: any; 47 | } 48 | 49 | // Filename aliases 50 | declare module 'babel-loader/lib/fs-cache.js' { 51 | declare module.exports: $Exports<'babel-loader/lib/fs-cache'>; 52 | } 53 | declare module 'babel-loader/lib/index.js' { 54 | declare module.exports: $Exports<'babel-loader/lib/index'>; 55 | } 56 | declare module 'babel-loader/lib/resolve-rc.js' { 57 | declare module.exports: $Exports<'babel-loader/lib/resolve-rc'>; 58 | } 59 | declare module 'babel-loader/lib/utils/exists.js' { 60 | declare module.exports: $Exports<'babel-loader/lib/utils/exists'>; 61 | } 62 | declare module 'babel-loader/lib/utils/read.js' { 63 | declare module.exports: $Exports<'babel-loader/lib/utils/read'>; 64 | } 65 | declare module 'babel-loader/lib/utils/relative.js' { 66 | declare module.exports: $Exports<'babel-loader/lib/utils/relative'>; 67 | } 68 | -------------------------------------------------------------------------------- /examples/todolist/src/components/Todo.vue: -------------------------------------------------------------------------------- 1 | 20 | 21 | 74 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-config-airbnb_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: fa05e0eb98d8d394c38182f9a58a1b96 2 | // flow-typed version: <>/eslint-config-airbnb_v^15.0.1/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-config-airbnb' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-config-airbnb' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'eslint-config-airbnb/base' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'eslint-config-airbnb/legacy' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'eslint-config-airbnb/rules/react-a11y' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'eslint-config-airbnb/rules/react' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'eslint-config-airbnb/test/test-base' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'eslint-config-airbnb/test/test-react-order' { 46 | declare module.exports: any; 47 | } 48 | 49 | // Filename aliases 50 | declare module 'eslint-config-airbnb/base.js' { 51 | declare module.exports: $Exports<'eslint-config-airbnb/base'>; 52 | } 53 | declare module 'eslint-config-airbnb/index' { 54 | declare module.exports: $Exports<'eslint-config-airbnb'>; 55 | } 56 | declare module 'eslint-config-airbnb/index.js' { 57 | declare module.exports: $Exports<'eslint-config-airbnb'>; 58 | } 59 | declare module 'eslint-config-airbnb/legacy.js' { 60 | declare module.exports: $Exports<'eslint-config-airbnb/legacy'>; 61 | } 62 | declare module 'eslint-config-airbnb/rules/react-a11y.js' { 63 | declare module.exports: $Exports<'eslint-config-airbnb/rules/react-a11y'>; 64 | } 65 | declare module 'eslint-config-airbnb/rules/react.js' { 66 | declare module.exports: $Exports<'eslint-config-airbnb/rules/react'>; 67 | } 68 | declare module 'eslint-config-airbnb/test/test-base.js' { 69 | declare module.exports: $Exports<'eslint-config-airbnb/test/test-base'>; 70 | } 71 | declare module 'eslint-config-airbnb/test/test-react-order.js' { 72 | declare module.exports: $Exports<'eslint-config-airbnb/test/test-react-order'>; 73 | } 74 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vuez", 3 | "version": "0.1.0", 4 | "description": "A simple and lightweight state management for vuejs projects.", 5 | "main": "dist/vuez.js", 6 | "files": [ 7 | "dist", 8 | "src" 9 | ], 10 | "scripts": { 11 | "dev": "node examples/server.js", 12 | "build": "npm run clean && npm run build:dev && npm run build:prd", 13 | "build:dev": "webpack src/index.js dist/vuez.js --config tools/webpack.config.dev.js", 14 | "build:prd": "webpack src/index.js dist/vuez.min.js --config tools/webpack.config.prd.js", 15 | "prepublish": "npm run build", 16 | "lint": "eslint src test", 17 | "clean": "rimraf dist build", 18 | "test": "npm run lint && npm run test:unit", 19 | "test:unit": "karma start --single-run --no-auto-watch karma.config.js", 20 | "test:unit-dev": "karma start -auto-watch karma.config.js", 21 | "test:e2e": "node test/e2e/runner.js" 22 | }, 23 | "keywords": [ 24 | "vue", 25 | "state" 26 | ], 27 | "devDependencies": { 28 | "babel-cli": "^6.24.1", 29 | "babel-core": "^6.24.1", 30 | "babel-eslint": "^7.1.1", 31 | "babel-istanbul": "^0.6.0", 32 | "babel-istanbul-loader": "0.0.1", 33 | "babel-loader": "^6.4.1", 34 | "babel-plugin-add-module-exports": "^0.1.2", 35 | "babel-preset-es2015": "^6.24.1", 36 | "babel-preset-flow": "^6.23.0", 37 | "chromedriver": "^2.29.1", 38 | "cross-spawn": "^5.1.0", 39 | "css-loader": "^0.28.1", 40 | "eslint": "^3.19.0", 41 | "eslint-config-airbnb": "^15.0.1", 42 | "eslint-config-vue": "^2.0.2", 43 | "eslint-plugin-import": "^2.2.0", 44 | "eslint-plugin-jsx-a11y": "^5.0.3", 45 | "eslint-plugin-react": "^7.0.1", 46 | "eslint-plugin-vue": "^2.0.1", 47 | "express": "^4.15.2", 48 | "flow-bin": "^0.47.0", 49 | "jasmine-core": "^2.4.1", 50 | "karma": "^0.13.19", 51 | "karma-chrome-launcher": "^0.2.2", 52 | "karma-coverage": "^0.5.3", 53 | "karma-jasmine": "^0.3.6", 54 | "karma-sourcemap-loader": "^0.3.7", 55 | "karma-webpack": "^1.7.0", 56 | "loader-utils": "^0.2.12", 57 | "lodash-webpack-plugin": "^0.11.3", 58 | "nightwatch": "^0.9.15", 59 | "nightwatch-helpers": "^1.2.0", 60 | "rimraf": "^2.5.0", 61 | "selenium-server": "^3.4.0", 62 | "todomvc-app-css": "^2.1.0", 63 | "vue": "^2.1.10", 64 | "vue-loader": "^11.0.0", 65 | "vue-template-compiler": "^2.1.10", 66 | "webpack": "^1.12.11", 67 | "webpack-dev-middleware": "^1.10.0", 68 | "webpack-hot-middleware": "^2.18.0" 69 | }, 70 | "author": "Mark Feng", 71 | "license": "MIT", 72 | "dependencies": { 73 | "lodash": "^4.17.4" 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /flow-typed/npm/karma-coverage_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: e5cc3c22a9b7781d5a154e868767d0a3 2 | // flow-typed version: <>/karma-coverage_v^0.5.3/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'karma-coverage' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'karma-coverage' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'karma-coverage/gruntfile' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'karma-coverage/lib/coverage-map' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'karma-coverage/lib/in-memory-report' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'karma-coverage/lib/index' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'karma-coverage/lib/preprocessor' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'karma-coverage/lib/reporter' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'karma-coverage/lib/source-cache-store' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'karma-coverage/lib/source-cache' { 54 | declare module.exports: any; 55 | } 56 | 57 | // Filename aliases 58 | declare module 'karma-coverage/gruntfile.js' { 59 | declare module.exports: $Exports<'karma-coverage/gruntfile'>; 60 | } 61 | declare module 'karma-coverage/lib/coverage-map.js' { 62 | declare module.exports: $Exports<'karma-coverage/lib/coverage-map'>; 63 | } 64 | declare module 'karma-coverage/lib/in-memory-report.js' { 65 | declare module.exports: $Exports<'karma-coverage/lib/in-memory-report'>; 66 | } 67 | declare module 'karma-coverage/lib/index.js' { 68 | declare module.exports: $Exports<'karma-coverage/lib/index'>; 69 | } 70 | declare module 'karma-coverage/lib/preprocessor.js' { 71 | declare module.exports: $Exports<'karma-coverage/lib/preprocessor'>; 72 | } 73 | declare module 'karma-coverage/lib/reporter.js' { 74 | declare module.exports: $Exports<'karma-coverage/lib/reporter'>; 75 | } 76 | declare module 'karma-coverage/lib/source-cache-store.js' { 77 | declare module.exports: $Exports<'karma-coverage/lib/source-cache-store'>; 78 | } 79 | declare module 'karma-coverage/lib/source-cache.js' { 80 | declare module.exports: $Exports<'karma-coverage/lib/source-cache'>; 81 | } 82 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-eslint_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: aec7ecc0f2e19d71dc843408c2c4461d 2 | // flow-typed version: <>/babel-eslint_v^7.1.1/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-eslint' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-eslint' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-eslint/babylon-to-espree/attachComments' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-eslint/babylon-to-espree/convertComments' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'babel-eslint/babylon-to-espree/convertTemplateType' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'babel-eslint/babylon-to-espree/index' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'babel-eslint/babylon-to-espree/toAST' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'babel-eslint/babylon-to-espree/toToken' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'babel-eslint/babylon-to-espree/toTokens' { 50 | declare module.exports: any; 51 | } 52 | 53 | // Filename aliases 54 | declare module 'babel-eslint/babylon-to-espree/attachComments.js' { 55 | declare module.exports: $Exports<'babel-eslint/babylon-to-espree/attachComments'>; 56 | } 57 | declare module 'babel-eslint/babylon-to-espree/convertComments.js' { 58 | declare module.exports: $Exports<'babel-eslint/babylon-to-espree/convertComments'>; 59 | } 60 | declare module 'babel-eslint/babylon-to-espree/convertTemplateType.js' { 61 | declare module.exports: $Exports<'babel-eslint/babylon-to-espree/convertTemplateType'>; 62 | } 63 | declare module 'babel-eslint/babylon-to-espree/index.js' { 64 | declare module.exports: $Exports<'babel-eslint/babylon-to-espree/index'>; 65 | } 66 | declare module 'babel-eslint/babylon-to-espree/toAST.js' { 67 | declare module.exports: $Exports<'babel-eslint/babylon-to-espree/toAST'>; 68 | } 69 | declare module 'babel-eslint/babylon-to-espree/toToken.js' { 70 | declare module.exports: $Exports<'babel-eslint/babylon-to-espree/toToken'>; 71 | } 72 | declare module 'babel-eslint/babylon-to-espree/toTokens.js' { 73 | declare module.exports: $Exports<'babel-eslint/babylon-to-espree/toTokens'>; 74 | } 75 | declare module 'babel-eslint/index' { 76 | declare module.exports: $Exports<'babel-eslint'>; 77 | } 78 | declare module 'babel-eslint/index.js' { 79 | declare module.exports: $Exports<'babel-eslint'>; 80 | } 81 | -------------------------------------------------------------------------------- /flow-typed/npm/css-loader_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: efc8884cf006b6fc081ba5407bd28f1e 2 | // flow-typed version: <>/css-loader_v^0.28.1/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'css-loader' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'css-loader' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'css-loader/lib/compile-exports' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'css-loader/lib/createResolver' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'css-loader/lib/css-base' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'css-loader/lib/getImportPrefix' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'css-loader/lib/getLocalIdent' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'css-loader/lib/loader' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'css-loader/lib/localsLoader' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'css-loader/lib/processCss' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'css-loader/locals' { 58 | declare module.exports: any; 59 | } 60 | 61 | // Filename aliases 62 | declare module 'css-loader/index' { 63 | declare module.exports: $Exports<'css-loader'>; 64 | } 65 | declare module 'css-loader/index.js' { 66 | declare module.exports: $Exports<'css-loader'>; 67 | } 68 | declare module 'css-loader/lib/compile-exports.js' { 69 | declare module.exports: $Exports<'css-loader/lib/compile-exports'>; 70 | } 71 | declare module 'css-loader/lib/createResolver.js' { 72 | declare module.exports: $Exports<'css-loader/lib/createResolver'>; 73 | } 74 | declare module 'css-loader/lib/css-base.js' { 75 | declare module.exports: $Exports<'css-loader/lib/css-base'>; 76 | } 77 | declare module 'css-loader/lib/getImportPrefix.js' { 78 | declare module.exports: $Exports<'css-loader/lib/getImportPrefix'>; 79 | } 80 | declare module 'css-loader/lib/getLocalIdent.js' { 81 | declare module.exports: $Exports<'css-loader/lib/getLocalIdent'>; 82 | } 83 | declare module 'css-loader/lib/loader.js' { 84 | declare module.exports: $Exports<'css-loader/lib/loader'>; 85 | } 86 | declare module 'css-loader/lib/localsLoader.js' { 87 | declare module.exports: $Exports<'css-loader/lib/localsLoader'>; 88 | } 89 | declare module 'css-loader/lib/processCss.js' { 90 | declare module.exports: $Exports<'css-loader/lib/processCss'>; 91 | } 92 | declare module 'css-loader/locals.js' { 93 | declare module.exports: $Exports<'css-loader/locals'>; 94 | } 95 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-cli_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 25c5e9a036a3e199649f88360d74aba9 2 | // flow-typed version: <>/babel-cli_v^6.24.1/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-cli' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-cli' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-cli/bin/babel-doctor' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-cli/bin/babel-external-helpers' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'babel-cli/bin/babel-node' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'babel-cli/bin/babel' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'babel-cli/lib/_babel-node' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'babel-cli/lib/babel-external-helpers' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'babel-cli/lib/babel-node' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'babel-cli/lib/babel/dir' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'babel-cli/lib/babel/file' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'babel-cli/lib/babel/index' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'babel-cli/lib/babel/util' { 66 | declare module.exports: any; 67 | } 68 | 69 | // Filename aliases 70 | declare module 'babel-cli/bin/babel-doctor.js' { 71 | declare module.exports: $Exports<'babel-cli/bin/babel-doctor'>; 72 | } 73 | declare module 'babel-cli/bin/babel-external-helpers.js' { 74 | declare module.exports: $Exports<'babel-cli/bin/babel-external-helpers'>; 75 | } 76 | declare module 'babel-cli/bin/babel-node.js' { 77 | declare module.exports: $Exports<'babel-cli/bin/babel-node'>; 78 | } 79 | declare module 'babel-cli/bin/babel.js' { 80 | declare module.exports: $Exports<'babel-cli/bin/babel'>; 81 | } 82 | declare module 'babel-cli/index' { 83 | declare module.exports: $Exports<'babel-cli'>; 84 | } 85 | declare module 'babel-cli/index.js' { 86 | declare module.exports: $Exports<'babel-cli'>; 87 | } 88 | declare module 'babel-cli/lib/_babel-node.js' { 89 | declare module.exports: $Exports<'babel-cli/lib/_babel-node'>; 90 | } 91 | declare module 'babel-cli/lib/babel-external-helpers.js' { 92 | declare module.exports: $Exports<'babel-cli/lib/babel-external-helpers'>; 93 | } 94 | declare module 'babel-cli/lib/babel-node.js' { 95 | declare module.exports: $Exports<'babel-cli/lib/babel-node'>; 96 | } 97 | declare module 'babel-cli/lib/babel/dir.js' { 98 | declare module.exports: $Exports<'babel-cli/lib/babel/dir'>; 99 | } 100 | declare module 'babel-cli/lib/babel/file.js' { 101 | declare module.exports: $Exports<'babel-cli/lib/babel/file'>; 102 | } 103 | declare module 'babel-cli/lib/babel/index.js' { 104 | declare module.exports: $Exports<'babel-cli/lib/babel/index'>; 105 | } 106 | declare module 'babel-cli/lib/babel/util.js' { 107 | declare module.exports: $Exports<'babel-cli/lib/babel/util'>; 108 | } 109 | -------------------------------------------------------------------------------- /flow-typed/npm/webpack-hot-middleware_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: ffe61dc165b94ef7493ae3d9376ebf9e 2 | // flow-typed version: <>/webpack-hot-middleware_v^2.18.0/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'webpack-hot-middleware' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'webpack-hot-middleware' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'webpack-hot-middleware/client-overlay' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'webpack-hot-middleware/client' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'webpack-hot-middleware/example/client' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'webpack-hot-middleware/example/extra' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'webpack-hot-middleware/example/server' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'webpack-hot-middleware/example/webpack.config' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'webpack-hot-middleware/example/webpack.config.multientry' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'webpack-hot-middleware/helpers' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'webpack-hot-middleware/middleware' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'webpack-hot-middleware/process-update' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'webpack-hot-middleware/test/client-test' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'webpack-hot-middleware/test/helpers-test' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'webpack-hot-middleware/test/middleware-test' { 74 | declare module.exports: any; 75 | } 76 | 77 | // Filename aliases 78 | declare module 'webpack-hot-middleware/client-overlay.js' { 79 | declare module.exports: $Exports<'webpack-hot-middleware/client-overlay'>; 80 | } 81 | declare module 'webpack-hot-middleware/client.js' { 82 | declare module.exports: $Exports<'webpack-hot-middleware/client'>; 83 | } 84 | declare module 'webpack-hot-middleware/example/client.js' { 85 | declare module.exports: $Exports<'webpack-hot-middleware/example/client'>; 86 | } 87 | declare module 'webpack-hot-middleware/example/extra.js' { 88 | declare module.exports: $Exports<'webpack-hot-middleware/example/extra'>; 89 | } 90 | declare module 'webpack-hot-middleware/example/server.js' { 91 | declare module.exports: $Exports<'webpack-hot-middleware/example/server'>; 92 | } 93 | declare module 'webpack-hot-middleware/example/webpack.config.js' { 94 | declare module.exports: $Exports<'webpack-hot-middleware/example/webpack.config'>; 95 | } 96 | declare module 'webpack-hot-middleware/example/webpack.config.multientry.js' { 97 | declare module.exports: $Exports<'webpack-hot-middleware/example/webpack.config.multientry'>; 98 | } 99 | declare module 'webpack-hot-middleware/helpers.js' { 100 | declare module.exports: $Exports<'webpack-hot-middleware/helpers'>; 101 | } 102 | declare module 'webpack-hot-middleware/middleware.js' { 103 | declare module.exports: $Exports<'webpack-hot-middleware/middleware'>; 104 | } 105 | declare module 'webpack-hot-middleware/process-update.js' { 106 | declare module.exports: $Exports<'webpack-hot-middleware/process-update'>; 107 | } 108 | declare module 'webpack-hot-middleware/test/client-test.js' { 109 | declare module.exports: $Exports<'webpack-hot-middleware/test/client-test'>; 110 | } 111 | declare module 'webpack-hot-middleware/test/helpers-test.js' { 112 | declare module.exports: $Exports<'webpack-hot-middleware/test/helpers-test'>; 113 | } 114 | declare module 'webpack-hot-middleware/test/middleware-test.js' { 115 | declare module.exports: $Exports<'webpack-hot-middleware/test/middleware-test'>; 116 | } 117 | -------------------------------------------------------------------------------- /flow-typed/npm/vue-loader_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 7fd500b0e8427b1dc5614bd38cf0aada 2 | // flow-typed version: <>/vue-loader_v^11.0.0/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'vue-loader' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'vue-loader' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'vue-loader/lib/component-normalizer' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'vue-loader/lib/loader' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'vue-loader/lib/parser' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'vue-loader/lib/selector' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'vue-loader/lib/style-compiler/index' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'vue-loader/lib/style-compiler/load-postcss-config' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'vue-loader/lib/style-compiler/plugins/scope-id' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'vue-loader/lib/style-compiler/plugins/trim' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'vue-loader/lib/template-compiler/index' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'vue-loader/lib/template-compiler/modules/transform-require' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'vue-loader/lib/template-compiler/preprocessor' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'vue-loader/lib/utils/gen-id' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'vue-loader/lib/utils/normalize' { 74 | declare module.exports: any; 75 | } 76 | 77 | // Filename aliases 78 | declare module 'vue-loader/index' { 79 | declare module.exports: $Exports<'vue-loader'>; 80 | } 81 | declare module 'vue-loader/index.js' { 82 | declare module.exports: $Exports<'vue-loader'>; 83 | } 84 | declare module 'vue-loader/lib/component-normalizer.js' { 85 | declare module.exports: $Exports<'vue-loader/lib/component-normalizer'>; 86 | } 87 | declare module 'vue-loader/lib/loader.js' { 88 | declare module.exports: $Exports<'vue-loader/lib/loader'>; 89 | } 90 | declare module 'vue-loader/lib/parser.js' { 91 | declare module.exports: $Exports<'vue-loader/lib/parser'>; 92 | } 93 | declare module 'vue-loader/lib/selector.js' { 94 | declare module.exports: $Exports<'vue-loader/lib/selector'>; 95 | } 96 | declare module 'vue-loader/lib/style-compiler/index.js' { 97 | declare module.exports: $Exports<'vue-loader/lib/style-compiler/index'>; 98 | } 99 | declare module 'vue-loader/lib/style-compiler/load-postcss-config.js' { 100 | declare module.exports: $Exports<'vue-loader/lib/style-compiler/load-postcss-config'>; 101 | } 102 | declare module 'vue-loader/lib/style-compiler/plugins/scope-id.js' { 103 | declare module.exports: $Exports<'vue-loader/lib/style-compiler/plugins/scope-id'>; 104 | } 105 | declare module 'vue-loader/lib/style-compiler/plugins/trim.js' { 106 | declare module.exports: $Exports<'vue-loader/lib/style-compiler/plugins/trim'>; 107 | } 108 | declare module 'vue-loader/lib/template-compiler/index.js' { 109 | declare module.exports: $Exports<'vue-loader/lib/template-compiler/index'>; 110 | } 111 | declare module 'vue-loader/lib/template-compiler/modules/transform-require.js' { 112 | declare module.exports: $Exports<'vue-loader/lib/template-compiler/modules/transform-require'>; 113 | } 114 | declare module 'vue-loader/lib/template-compiler/preprocessor.js' { 115 | declare module.exports: $Exports<'vue-loader/lib/template-compiler/preprocessor'>; 116 | } 117 | declare module 'vue-loader/lib/utils/gen-id.js' { 118 | declare module.exports: $Exports<'vue-loader/lib/utils/gen-id'>; 119 | } 120 | declare module 'vue-loader/lib/utils/normalize.js' { 121 | declare module.exports: $Exports<'vue-loader/lib/utils/normalize'>; 122 | } 123 | -------------------------------------------------------------------------------- /examples/todolist/src/App.vue: -------------------------------------------------------------------------------- 1 | 2 | 3 | 45 | 46 | 114 | -------------------------------------------------------------------------------- /flow-typed/npm/jasmine-core_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: a3b49935cda64e979c9a9fd56a9f9af2 2 | // flow-typed version: <>/jasmine-core_v^2.4.1/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'jasmine-core' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'jasmine-core' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'jasmine-core/lib/console/console' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'jasmine-core/lib/jasmine-core' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'jasmine-core/lib/jasmine-core/boot' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'jasmine-core/lib/jasmine-core/example/node_example/lib/jasmine_examples/Player' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'jasmine-core/lib/jasmine-core/example/node_example/lib/jasmine_examples/Song' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'jasmine-core/lib/jasmine-core/example/node_example/spec/helpers/jasmine_examples/SpecHelper' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'jasmine-core/lib/jasmine-core/example/node_example/spec/jasmine_examples/PlayerSpec' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'jasmine-core/lib/jasmine-core/example/spec/PlayerSpec' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'jasmine-core/lib/jasmine-core/example/spec/SpecHelper' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'jasmine-core/lib/jasmine-core/example/src/Player' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'jasmine-core/lib/jasmine-core/example/src/Song' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'jasmine-core/lib/jasmine-core/jasmine-html' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'jasmine-core/lib/jasmine-core/jasmine' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'jasmine-core/lib/jasmine-core/json2' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'jasmine-core/lib/jasmine-core/node_boot' { 82 | declare module.exports: any; 83 | } 84 | 85 | // Filename aliases 86 | declare module 'jasmine-core/lib/console/console.js' { 87 | declare module.exports: $Exports<'jasmine-core/lib/console/console'>; 88 | } 89 | declare module 'jasmine-core/lib/jasmine-core.js' { 90 | declare module.exports: $Exports<'jasmine-core/lib/jasmine-core'>; 91 | } 92 | declare module 'jasmine-core/lib/jasmine-core/boot.js' { 93 | declare module.exports: $Exports<'jasmine-core/lib/jasmine-core/boot'>; 94 | } 95 | declare module 'jasmine-core/lib/jasmine-core/example/node_example/lib/jasmine_examples/Player.js' { 96 | declare module.exports: $Exports<'jasmine-core/lib/jasmine-core/example/node_example/lib/jasmine_examples/Player'>; 97 | } 98 | declare module 'jasmine-core/lib/jasmine-core/example/node_example/lib/jasmine_examples/Song.js' { 99 | declare module.exports: $Exports<'jasmine-core/lib/jasmine-core/example/node_example/lib/jasmine_examples/Song'>; 100 | } 101 | declare module 'jasmine-core/lib/jasmine-core/example/node_example/spec/helpers/jasmine_examples/SpecHelper.js' { 102 | declare module.exports: $Exports<'jasmine-core/lib/jasmine-core/example/node_example/spec/helpers/jasmine_examples/SpecHelper'>; 103 | } 104 | declare module 'jasmine-core/lib/jasmine-core/example/node_example/spec/jasmine_examples/PlayerSpec.js' { 105 | declare module.exports: $Exports<'jasmine-core/lib/jasmine-core/example/node_example/spec/jasmine_examples/PlayerSpec'>; 106 | } 107 | declare module 'jasmine-core/lib/jasmine-core/example/spec/PlayerSpec.js' { 108 | declare module.exports: $Exports<'jasmine-core/lib/jasmine-core/example/spec/PlayerSpec'>; 109 | } 110 | declare module 'jasmine-core/lib/jasmine-core/example/spec/SpecHelper.js' { 111 | declare module.exports: $Exports<'jasmine-core/lib/jasmine-core/example/spec/SpecHelper'>; 112 | } 113 | declare module 'jasmine-core/lib/jasmine-core/example/src/Player.js' { 114 | declare module.exports: $Exports<'jasmine-core/lib/jasmine-core/example/src/Player'>; 115 | } 116 | declare module 'jasmine-core/lib/jasmine-core/example/src/Song.js' { 117 | declare module.exports: $Exports<'jasmine-core/lib/jasmine-core/example/src/Song'>; 118 | } 119 | declare module 'jasmine-core/lib/jasmine-core/jasmine-html.js' { 120 | declare module.exports: $Exports<'jasmine-core/lib/jasmine-core/jasmine-html'>; 121 | } 122 | declare module 'jasmine-core/lib/jasmine-core/jasmine.js' { 123 | declare module.exports: $Exports<'jasmine-core/lib/jasmine-core/jasmine'>; 124 | } 125 | declare module 'jasmine-core/lib/jasmine-core/json2.js' { 126 | declare module.exports: $Exports<'jasmine-core/lib/jasmine-core/json2'>; 127 | } 128 | declare module 'jasmine-core/lib/jasmine-core/node_boot.js' { 129 | declare module.exports: $Exports<'jasmine-core/lib/jasmine-core/node_boot'>; 130 | } 131 | -------------------------------------------------------------------------------- /src/store.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-underscore-dangle,no-undef,no-param-reassign */ 2 | /** 3 | * Created by fengchaoyi on 2017/4/26. 4 | */ 5 | // import lodash functions 6 | import isString from 'lodash/isString'; 7 | import toString from 'lodash/toString'; 8 | import isUndefined from 'lodash/isUndefined'; 9 | import has from 'lodash/has'; 10 | import isEqual from 'lodash/isEqual'; 11 | import clone from 'lodash/clone'; 12 | import isFunction from 'lodash/isFunction'; 13 | import unset from 'lodash/unset'; 14 | import isNull from 'lodash/isNull'; 15 | import forEach from 'lodash/forEach'; 16 | // Center store object 17 | import $mixin from './mixin'; 18 | import { assert, isSameDataType } from './util'; 19 | 20 | let Vue; 21 | 22 | function getObserved(store, _name) { 23 | return store._observed[_name]; 24 | } 25 | 26 | function setObserved(store, _name, _value) { 27 | const oldVal = store._observed[_name]; 28 | if (!isUndefined(oldVal) && !isSameDataType(oldVal, _value)) { 29 | console.warn(`[vuez] please use the same data type for observer [${_name}]'s value.`); 30 | } 31 | store._observed[_name] = clone(_value); 32 | Vue.set(store.state, _name, store._observed[_name]); 33 | } 34 | 35 | // check undefined 36 | function typeCheck(val) { 37 | if (isUndefined(val) || isNull(val)) { 38 | return false; 39 | } 40 | return val; 41 | } 42 | 43 | // init store VM 44 | function initVM(store, state) { 45 | // use a Vue instance to store the state tree 46 | // const silent = Vue.config.silent; 47 | // 48 | const computed = {}; // save things later 49 | Vue.config.silent = true; 50 | store._vm = new Vue({ 51 | data: { 52 | $$state: state, 53 | }, 54 | computed, 55 | }); 56 | } 57 | 58 | export class Store { 59 | constructor() { 60 | assert(Vue, 'Vuez must be installed by Vue.use(Vuez) before usage'); 61 | 62 | const state = {}; // state object 63 | 64 | // internal state 65 | this._observed = Object.create(null); // observed object, name and current object value 66 | this._unwatchFn = Object.create(null); // keep unwatch functions for each name 67 | 68 | this._watcherVM = new Vue(); 69 | 70 | initVM(this, state); 71 | } 72 | 73 | get state() { 74 | return this._vm._data.$$state; 75 | } 76 | 77 | // set state(v) { 78 | // assert(false, 'Use store.replaceState() to explicit replace store state.'); 79 | // } 80 | 81 | replaceState(state) { 82 | this._vm._data.$$state = state; 83 | } 84 | 85 | observe(_inName, _value) { 86 | let _name = _inName || 'noname'; 87 | if (!typeCheck(_name)) { 88 | return undefined; 89 | } 90 | if (!isString(_name)) { 91 | try { 92 | _name = toString(_name); 93 | } catch (e) { 94 | return undefined; 95 | } 96 | } 97 | 98 | if (arguments.length === 1) { 99 | // only _name is passed, something like store.observe('name'); 100 | // use clone to manually update the value and trigger action 101 | setObserved(this, _name, this._observed[_name]); 102 | } else if (!isUndefined(_value)) { 103 | if (has(this._observed, _name)) { 104 | const oldVal = this._observed[_name]; 105 | // has old value and the old value is the same as new value? 106 | if (isEqual(oldVal, _value)) { 107 | // do nothing 108 | return getObserved(this, _name); 109 | } 110 | } 111 | // set new value 112 | setObserved(this, _name, _value); 113 | } else { 114 | // _value is undefined, treat it as a kind of value 115 | setObserved(this, _name, _value); 116 | } 117 | return _value; 118 | } 119 | 120 | action(_name, _actionFn) { 121 | if (!typeCheck(_name)) { 122 | return; 123 | } 124 | if (!isFunction(_actionFn)) { 125 | return; 126 | } 127 | 128 | const store = this; 129 | 130 | // set a watch object over $data.state object 131 | const unwatchFn = this._watcherVM.$watch( 132 | () => store.state[_name], 133 | () => { 134 | // do something 135 | _actionFn(store._observed[_name]); 136 | }); 137 | if (has(this._unwatchFn, _name)) { 138 | // add into the unwatch function array of this name 139 | this._unwatchFn[_name].push(unwatchFn); 140 | } else { 141 | this._unwatchFn[_name] = [unwatchFn]; 142 | } 143 | } 144 | 145 | unobserve(_name) { 146 | if (!has(this._observed, _name)) { 147 | console.warn(`[vuez] observer ${_name} not found, please check the name.`); 148 | return; 149 | } 150 | const unwatchFnArray = this._unwatchFn[_name]; 151 | forEach(unwatchFnArray, (fn) => { 152 | // execute the unwatch functions 153 | fn(); 154 | }); 155 | unset(this._observed, _name); 156 | } 157 | } 158 | 159 | export function install($Vue) { 160 | if (Vue) { 161 | console.error( 162 | 'Vuez already installed. Vue.use(Vuez) should be called only once.', 163 | ); 164 | return; 165 | } 166 | // plugin.install.apply(plugin, args); 167 | Vue = $Vue; 168 | 169 | // add custom hooks 170 | $mixin(Vue); 171 | } 172 | 173 | // auto install 174 | if (typeof window !== 'undefined' && window.Vue) { 175 | install(window.Vue); 176 | } 177 | -------------------------------------------------------------------------------- /test/e2e/specs/todolist.js: -------------------------------------------------------------------------------- 1 | // /* eslint-disable no-undef */ 2 | // 3 | // module.exports = { 4 | // todolist(browser) { 5 | // function createNewItem(text) { 6 | // return browser.enterValue('.new-todo', text); 7 | // } 8 | // 9 | // function removeItemAt(n) { 10 | // return browser 11 | // .moveToElement(`.todo:nth-child(${n})`, 10, 10) 12 | // .click(`.todo:nth-child(${n}) .destroy`); 13 | // } 14 | // 15 | // browser 16 | // .url('http://localhost:8080/todolist/') 17 | // .waitForElementVisible('.todoapp', 1000) 18 | // .assert.notVisible('.main') 19 | // .assert.notVisible('.footer') 20 | // .assert.count('.filters .selected', 1); 21 | // 22 | // createNewItem('test') 23 | // .assert.count('.todo', 1) 24 | // .assert.notVisible('.todo .edit') 25 | // .assert.containsText('.todo label', 'test') 26 | // .assert.containsText('.todo-count strong', '1') 27 | // .assert.checked('.todo .toggle', false) 28 | // .assert.visible('.main') 29 | // .assert.visible('.footer') 30 | // .assert.notVisible('.clear-completed') 31 | // .assert.value('.new-todo', ''); 32 | // 33 | // createNewItem('test2') 34 | // .assert.count('.todo', 2) 35 | // .assert.containsText('.todo:nth-child(2) label', 'test2') 36 | // .assert.containsText('.todo-count strong', '2'); 37 | // 38 | // // toggle 39 | // browser 40 | // .click('.todo .toggle') 41 | // .assert.count('.todo.completed', 1) 42 | // .assert.cssClassPresent('.todo:nth-child(1)', 'completed') 43 | // .assert.containsText('.todo-count strong', '1') 44 | // .assert.visible('.clear-completed'); 45 | // 46 | // createNewItem('test3') 47 | // .assert.count('.todo', 3) 48 | // .assert.containsText('.todo:nth-child(3) label', 'test3') 49 | // .assert.containsText('.todo-count strong', '2'); 50 | // 51 | // createNewItem('test4'); 52 | // createNewItem('test5') 53 | // .assert.count('.todo', 5) 54 | // .assert.containsText('.todo-count strong', '4'); 55 | // 56 | // // toggle more 57 | // browser 58 | // .click('.todo:nth-child(4) .toggle') 59 | // .click('.todo:nth-child(5) .toggle') 60 | // .assert.count('.todo.completed', 3) 61 | // .assert.containsText('.todo-count strong', '2'); 62 | // 63 | // // remove 64 | // removeItemAt(1) 65 | // .assert.count('.todo', 4) 66 | // .assert.count('.todo.completed', 2) 67 | // .assert.containsText('.todo-count strong', '2'); 68 | // removeItemAt(2) 69 | // .assert.count('.todo', 3) 70 | // .assert.count('.todo.completed', 2) 71 | // .assert.containsText('.todo-count strong', '1'); 72 | // 73 | // // remove all 74 | // browser 75 | // .click('.clear-completed') 76 | // .assert.count('.todo', 1) 77 | // .assert.containsText('.todo label', 'test2') 78 | // .assert.count('.todo.completed', 0) 79 | // .assert.containsText('.todo-count strong', '1') 80 | // .assert.notVisible('.clear-completed'); 81 | // 82 | // // prepare to test filters 83 | // createNewItem('test'); 84 | // createNewItem('test') 85 | // .click('.todo:nth-child(2) .toggle') 86 | // .click('.todo:nth-child(3) .toggle'); 87 | // 88 | // // active filter 89 | // browser 90 | // .click('.filters li:nth-child(2) a') 91 | // .assert.count('.todo', 1) 92 | // .assert.count('.todo.completed', 0); 93 | // // add item with filter active 94 | // createNewItem('test') 95 | // .assert.count('.todo', 2); 96 | // 97 | // // complted filter 98 | // browser.click('.filters li:nth-child(3) a') 99 | // .assert.count('.todo', 2) 100 | // .assert.count('.todo.completed', 2); 101 | // 102 | // // toggling with filter active 103 | // browser 104 | // .click('.todo .toggle') 105 | // .assert.count('.todo', 1) 106 | // .click('.filters li:nth-child(2) a') 107 | // .assert.count('.todo', 3) 108 | // .click('.todo .toggle') 109 | // .assert.count('.todo', 2); 110 | // 111 | // // editing triggered by blur 112 | // browser 113 | // .click('.filters li:nth-child(1) a') 114 | // .dblClick('.todo:nth-child(1) label') 115 | // .assert.count('.todo.editing', 1) 116 | // .assert.focused('.todo:nth-child(1) .edit') 117 | // .clearValue('.todo:nth-child(1) .edit') 118 | // .setValue('.todo:nth-child(1) .edit', 'edited!') 119 | // .click('footer') // blur 120 | // .assert.count('.todo.editing', 0) 121 | // .assert.containsText('.todo:nth-child(1) label', 'edited!'); 122 | // 123 | // // editing triggered by enter 124 | // browser 125 | // .dblClick('.todo label') 126 | // .enterValue('.todo:nth-child(1) .edit', 'edited again!') 127 | // .assert.count('.todo.editing', 0) 128 | // .assert.containsText('.todo:nth-child(1) label', 'edited again!'); 129 | // 130 | // // cancel 131 | // browser 132 | // .dblClick('.todo label') 133 | // .clearValue('.todo:nth-child(1) .edit') 134 | // .setValue('.todo:nth-child(1) .edit', 'edited!') 135 | // .trigger('.todo:nth-child(1) .edit', 'keyup', 27) 136 | // .assert.count('.todo.editing', 0) 137 | // .assert.containsText('.todo:nth-child(1) label', 'edited again!'); 138 | // 139 | // // empty value should remove 140 | // browser 141 | // .dblClick('.todo label') 142 | // .enterValue('.todo:nth-child(1) .edit', ' ') 143 | // .assert.count('.todo', 3); 144 | // 145 | // // toggle all 146 | // // it's weird down here, would check later 147 | // browser 148 | // .assert.count('.todo:not(.completed)', 3) 149 | // .click('.toggle-all') 150 | // .assert.count('.todo.completed', 3) 151 | // .click('.toggle-all') 152 | // .assert.count('.todo:not(.completed)', 3) 153 | // .end(); 154 | // }, 155 | // }; 156 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Vuez [![Build Status](https://travis-ci.org/markselby9/vuez.svg?branch=develop)](https://travis-ci.org/markselby9/vuez) 2 | 3 | > A Simple but Powerful State Management for Vue.js projects. 4 | 5 | Vuez is a very simple but powerful state management library for Vue.js projects. 6 | 7 | Vuez is currently under development, and the document would be updated regularly as the project is improved. 8 | For any advice or requirements, please kindly give issues, PR, or directly contact me by [email](mailto:markselbyfcy@gmail.com). Thanks a lot:) 9 | 10 | 中文文档请点击[这里](https://github.com/markselby9/vuez/wiki/Document_zh)。 11 | 12 | ![alt tag](https://cloud.githubusercontent.com/assets/3454734/25782362/203fa0b2-337c-11e7-8b2d-9486625edc2b.png) 13 | 14 | ### Task list for Vuez release v0.1 15 | 16 | - [x] Backward compatibility for vue 1.x 17 | - [ ] Better interigation with Vue's lifecycle API 18 | - [x] End to end tests 19 | - [x] Use eslint 20 | - [x] Use flow 21 | - [ ] Naive debugger tools with {debug: true} option on when initialize 22 | - [ ] Auto observe without explicitly call .observe? (idea) 23 | - [ ] Migrate to Typescript if it can reduce bugs? (idea) 24 | 25 | ## Do you know Vuex? What's the difference? 26 | 27 | Some peers have mentioned about the confusing difference between Vuez and [Vuex](https://vuex.vuejs.org/). I'd like to say that for these developers below, please **skip Vuez and use Vuex**, at least for now: 28 | 29 | 1. Developers for **commercial or governmental projects**. Vuex is the official choice for Vue.js projects, with official and long-term support. You shouldn't consider Vuez for now as it doesn't have so much quality guarantee and document supports. 30 | 31 | 2. Developers in **team more than 3 people**. The core of Vuez is the 'observing table' with observed names on it. For a large-scaled team, it might cause bugs when collaborating, because Vuez has very little limitations on the usage of the store object. A team should consider Vuex, as Vuex has the 'modules' structure which I think is suitable for a team. And codes in Vuex projects are always easier to merge (in my experience). 32 | 33 | However, if you're not one of those developers I listed above, and you want to keep things as simple as possible when facing state management, use Vuez cause it's really simple. You can check the example projects for that simplicity. Just keep the 'table' in mind when developing, and that's enough. 34 | 35 | And if you faced any issues in your project, please kindly give them to me, or help Vuez with a PR yourself :). I know it's a no-mainstream and not-so-stable choice, but I do think that it has its own advantages, and can become a cool helper in your Vue.js projects. 36 | 37 | ## Steps for Vuez 38 | 39 | 1. Install following the 'Installation' part 40 | 41 | 2. In somewhere you want to trigger an action after a change event, use 42 | ``` 43 | this.$store.action('action_name', (params)=>{ 44 | //do something 45 | } 46 | ``` 47 | 48 | How to define the 'change event'? Simple, by calling 49 | ``` 50 | this.$store.observe('action_name', params); 51 | ``` 52 | 53 | Then it's done! :) 54 | 55 | ## Installation 56 | 57 | As always, vuez can be installed through npm or yarn. 58 | 59 | ``` bash 60 | npm install vuez --save 61 | ``` 62 | 63 | or 64 | 65 | ``` bash 66 | yarn add vuez 67 | ``` 68 | 69 | When used with a module system, you must explicitly install Vuez by calling `Vue.use()`: 70 | 71 | ``` js 72 | import Vue from 'vue' 73 | import Vuez from 'vuez' 74 | 75 | Vue.use(Vuez) 76 | const store = new Vuez.Store(); // initialize a new store 77 | 78 | new Vue({ 79 | store: store, // and use the store 80 | el: '#app', 81 | render: h => h(App) 82 | }); 83 | ``` 84 | 85 | And then please follow the 'Basic usage' part to use Vuez. 86 | 87 | ## Explain API 88 | 89 | In short, Vuez is a centralized monitoring 'store' which is accessible for all your Vue components after installing Vuez. 90 | From each component, you can access the store through `this.$store`. 91 | 92 | The store concept in Vuez is very simple, imagine an excel table with three columns: 'name', 'object', 'actions'. Whenever you are interested in monitoring an object or an event, start a new column in the table with a new name, with an object you plan to monitor. 93 | Then put everything you want to do when the object changed, as functions in the 'actions' column. Everytime you want to care about the 'name', you use `store.observe(this_name)` to observe it, if the `object` column's value has changed, all `actions` related to the `name` would be triggered. 94 | 95 | It has only two set of APIs: 96 | 97 | 1. observe/unobserve 98 | + `store.observe(name, observing_object)`, takes two parameters: name is a string for the observer, and observing_object is an object to observe. 99 | 100 | If a name is firstly created as an observer's name (firstly used in observe function), the object would be recorded. 101 | 102 | Then **everytime whenever** the observe function is called with the name, all actions with the name would be triggered if and only if the `observing_object` is changed. 103 | 104 | + `store.unobserve(name)` would cancel every action and observers related to the name. 105 | 106 | 2. action 107 | + `store.action(name, action_function)`, takes two parameters: name is a string for the observer, and action_function is the function to act when the object is changed during an 'observe'. 108 | 109 | The `action_function` here can have a parameter representing the current object value of the observing object. 110 | 111 | With these simple APIs, Vuez can deal with many troublesome event handling such as data communication, monitoring data change, etc. 112 | 113 | ## Simple example 114 | 115 | After [installing](installation.md) Vuez, let's make a simple observed object here. 116 | 117 | ``` js 118 | // Make sure to call Vue.use(Vuez) first before usage 119 | 120 | const store = new Vuez.Store(); 121 | let changingObject = { 122 | number: 1 123 | }; 124 | store.action('changing', (obj) => { 125 | console.log(obj.number); 126 | }); 127 | observeObject.number = 2; 128 | store.observe('changing', changingObject); // trigger the action and console would show '2' 129 | ``` 130 | 131 | ## Example projects 132 | 133 | Code is always better then plain explanation. Please check the Vue.js todolist app project using vuez, by running `npm run dev`. 134 | 135 | - [Todo List](https://github.com/markselby9/vuez/tree/develop/examples/todolist) 136 | - [Twobutton example](https://github.com/markselby9/vuez/tree/develop/examples/twobuttons) 137 | - [Weather Application](https://github.com/markselby9/vue2-vuez-weather) A weather application using Vuez and Vue2.x. 138 | 139 | 140 | ## Document 141 | 142 | Please check the document through [wiki](https://github.com/markselby9/vuez/wiki/Document). 143 | 144 | ## License 145 | 146 | [MIT](http://opensource.org/licenses/MIT) 147 | -------------------------------------------------------------------------------- /test/unit/store.spec.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | /** 3 | * Created by fengchaoyi on 2017/4/23. 4 | */ 5 | import Vue from 'vue/dist/vue.common'; 6 | import Vuez from '../../src/index'; 7 | import setup from './setup.spec'; 8 | 9 | describe('store', () => { 10 | beforeAll(() => { 11 | setup(); 12 | }); 13 | 14 | it('should observe data', () => { 15 | // return the value object in observe function 16 | const store = new Vuez.Store(); 17 | const temp = store.observe('foo', 'bar'); 18 | expect(temp).toBe('bar'); 19 | }); 20 | 21 | it('should trigger action correctly', (done) => { 22 | // should trigger action function after observed object has changed, 23 | // and after calling store.observe() 24 | const spy = jasmine.createSpy(); 25 | const store = new Vuez.Store(); 26 | const changingObject = { 27 | number: 1, 28 | }; 29 | store.action('changingObject', spy); 30 | store.observe('changingObject', changingObject); 31 | Vue.nextTick(() => { 32 | expect(spy).toHaveBeenCalled(); 33 | done(); 34 | }); 35 | }); 36 | 37 | it('support object style', (done) => { 38 | // should support different data type 39 | const spy = jasmine.createSpy(); 40 | const store = new Vuez.Store(); 41 | 42 | const status = { 43 | user: { 44 | name: 'foo', 45 | pwd: 'bar', 46 | }, 47 | }; 48 | store.observe('status', status); 49 | store.action('status', spy); 50 | 51 | Vue.set(status, 'user', [ 52 | { 53 | name: 'foo', 54 | pwd: 'bar', 55 | }, 56 | { 57 | name: 'foo2', 58 | pwd: 'bar2', 59 | }, 60 | ]); // it's different? 61 | const status2 = store.observe('status', status); 62 | Vue.nextTick(() => { 63 | expect(status2.user.length).toBe(2); 64 | expect(spy).toHaveBeenCalled(); 65 | done(); 66 | }); 67 | }); 68 | 69 | it('should trigger action with parameter', (done) => { 70 | // should trigger action function with current value 71 | const triggerSpy = jasmine.createSpy(); 72 | const store = new Vuez.Store(); 73 | 74 | const observed = { 75 | name: 'alice', 76 | }; 77 | const observed1 = store.observe('observed', observed); 78 | store.action('observed', triggerSpy); 79 | observed1.name = 'bob'; 80 | store.observe('observed', observed1); 81 | Vue.nextTick(() => { 82 | expect(triggerSpy).toHaveBeenCalledWith({ 83 | name: 'bob', 84 | }); 85 | done(); 86 | }); 87 | }); 88 | 89 | it('should allow multiple action for one name', (done) => { 90 | const store = new Vuez.Store(); 91 | const spy1 = jasmine.createSpy(); 92 | const spy2 = jasmine.createSpy(); 93 | 94 | const object1 = { 95 | foo: 'bar', 96 | }; 97 | store.observe('object', object1); 98 | store.action('object', spy1); 99 | store.action('object', spy2); 100 | // trigger action 101 | object1.mew = 'miao'; 102 | store.observe('object'); 103 | Vue.nextTick(() => { 104 | expect(spy1).toHaveBeenCalled(); 105 | expect(spy2).toHaveBeenCalled(); 106 | done(); 107 | }); 108 | }); 109 | 110 | it('should suggest the same object data type for an observer', (done) => { 111 | // if values of two different data type are set for one observer, console would show warning 112 | const store = new Vuez.Store(); 113 | spyOn(console, 'warn'); 114 | const spy1 = jasmine.createSpy(); 115 | 116 | let object1 = { 117 | foo: 'bar', 118 | }; 119 | store.observe('object', object1); 120 | store.action('object', spy1); 121 | // trigger action 122 | object1 = 'miao'; 123 | store.observe('object', object1); 124 | Vue.nextTick(() => { 125 | expect(spy1).toHaveBeenCalled(); 126 | done(); 127 | }); 128 | 129 | const warnText = `[vuez] please use the same data type for observer [${'object'}]'s value.`; 130 | Vue.nextTick(() => { 131 | expect(console.warn).toHaveBeenCalledWith( 132 | warnText, 133 | ); 134 | done(); 135 | }); 136 | }); 137 | 138 | it('should be able to cancel observers and actions on an object', (done) => { 139 | const spy = jasmine.createSpy(); 140 | const store = new Vuez.Store(); 141 | const changingObject = { 142 | number: 1, 143 | }; 144 | const observeObject = store.observe('changingObject', changingObject); 145 | store.action('changingObject', spy); 146 | Vue.nextTick(() => { 147 | expect(spy).toHaveBeenCalledTimes(0); 148 | observeObject.number = 2; 149 | store.observe('changingObject', observeObject); 150 | 151 | Vue.nextTick(() => { 152 | expect(spy).toHaveBeenCalledTimes(1); 153 | 154 | // unobserve 155 | store.unobserve('changingObject'); 156 | expect(store.observe('changingObject')).toBeUndefined(); // should be undefined 157 | observeObject.number = 3; 158 | store.observe('changingObject', observeObject); 159 | expect(spy).toHaveBeenCalledTimes(1); // should not fire spy again 160 | done(); 161 | }); 162 | }); 163 | }); 164 | 165 | it('should not trigger action if the new value is not changed', (done) => { 166 | const spy = jasmine.createSpy(); 167 | const store = new Vuez.Store(); 168 | const changingObject = { 169 | number: 1, 170 | }; 171 | store.observe('changingObject', changingObject); 172 | store.action('changingObject', spy); 173 | changingObject.number = 2; 174 | store.observe('changingObject', changingObject); 175 | Vue.nextTick(() => { 176 | expect(spy).toHaveBeenCalledTimes(1); 177 | const newButSameObject = { 178 | number: 2, 179 | }; 180 | store.observe('changingObject', newButSameObject); // should not trigger 181 | 182 | Vue.nextTick(() => { 183 | expect(spy).toHaveBeenCalledTimes(1); 184 | done(); 185 | }); 186 | }); 187 | }); 188 | 189 | // TODO: keep the force trigger function? 190 | // it('should be able to force trigger an action even if the value is not changed', () => { 191 | // const spy = jasmine.createSpy(); 192 | // const store = new Vuez.Store(); 193 | // const changingObject = { 194 | // number: 1, 195 | // }; 196 | // store.observe('changingObject', changingObject); 197 | // store.action('changingObject', spy); 198 | // changingObject.number = 2; 199 | // store.observe('changingObject', changingObject); 200 | // expect(spy).toHaveBeenCalledTimes(1); 201 | // 202 | // store.observe('changingObject', changingObject); // force trigger 203 | // expect(spy).toHaveBeenCalledTimes(2); 204 | // }); 205 | }); 206 | -------------------------------------------------------------------------------- /flow-typed/npm/express_v4.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 0a6a6906c197a7b95b251a16f7064bee 2 | // flow-typed version: f471f20d31/express_v4.x.x/flow_>=v0.32.x 3 | 4 | import type { Server } from 'http'; 5 | 6 | declare type express$RouterOptions = { 7 | caseSensitive?: boolean, 8 | mergeParams?: boolean, 9 | strict?: boolean 10 | }; 11 | 12 | declare class express$RequestResponseBase { 13 | app: express$Application; 14 | get(field: string): string | void; 15 | } 16 | 17 | declare class express$Request extends http$IncomingMessage mixins express$RequestResponseBase { 18 | baseUrl: string; 19 | body: any; 20 | cookies: {[cookie: string]: string}; 21 | fresh: boolean; 22 | hostname: string; 23 | ip: string; 24 | ips: Array; 25 | method: string; 26 | originalUrl: string; 27 | params: {[param: string]: string}; 28 | path: string; 29 | protocol: 'https' | 'http'; 30 | query: {[name: string]: string}; 31 | route: string; 32 | secure: boolean; 33 | signedCookies: {[signedCookie: string]: string}; 34 | stale: boolean; 35 | subdomains: Array; 36 | xhr: boolean; 37 | accepts(types: string): string | false; 38 | acceptsCharsets(...charsets: Array): string | false; 39 | acceptsEncodings(...encoding: Array): string | false; 40 | acceptsLanguages(...lang: Array): string | false; 41 | header(field: string): string | void; 42 | is(type: string): boolean; 43 | param(name: string, defaultValue?: string): string | void; 44 | } 45 | 46 | declare type express$CookieOptions = { 47 | domain?: string, 48 | encode?: (value: string) => string, 49 | expires?: Date, 50 | httpOnly?: boolean, 51 | maxAge?: number, 52 | path?: string, 53 | secure?: boolean, 54 | signed?: boolean 55 | }; 56 | 57 | declare type express$RenderCallback = (err: Error | null, html?: string) => mixed; 58 | 59 | declare type express$SendFileOptions = { 60 | maxAge?: number, 61 | root?: string, 62 | lastModified?: boolean, 63 | headers?: {[name: string]: string}, 64 | dotfiles?: 'allow' | 'deny' | 'ignore' 65 | }; 66 | 67 | declare class express$Response extends http$ServerResponse mixins express$RequestResponseBase { 68 | headersSent: boolean; 69 | locals: {[name: string]: mixed}; 70 | append(field: string, value?: string): this; 71 | attachment(filename?: string): this; 72 | cookie(name: string, value: string, options?: express$CookieOptions): this; 73 | clearCookie(name: string, options?: express$CookieOptions): this; 74 | download(path: string, filename?: string, callback?: (err?: ?Error) => void): this; 75 | format(typesObject: {[type: string]: Function}): this; 76 | json(body?: mixed): this; 77 | jsonp(body?: mixed): this; 78 | links(links: {[name: string]: string}): this; 79 | location(path: string): this; 80 | redirect(url: string, ...args: Array): this; 81 | redirect(status: number, url: string, ...args: Array): this; 82 | render(view: string, locals?: {[name: string]: mixed}, callback?: express$RenderCallback): this; 83 | send(body?: mixed): this; 84 | sendFile(path: string, options?: express$SendFileOptions, callback?: (err?: ?Error) => mixed): this; 85 | sendStatus(statusCode: number): this; 86 | header(field: string, value?: string): this; 87 | header(headers: {[name: string]: string}): this; 88 | set(field: string, value?: string|string[]): this; 89 | set(headers: {[name: string]: string}): this; 90 | status(statusCode: number): this; 91 | type(type: string): this; 92 | vary(field: string): this; 93 | } 94 | 95 | declare type express$NextFunction = (err?: ?Error | 'route') => mixed; 96 | declare type express$Middleware = 97 | ((req: express$Request, res: express$Response, next: express$NextFunction) => mixed) | 98 | ((error: ?Error, req: express$Request, res: express$Response, next: express$NextFunction) => mixed); 99 | declare interface express$RouteMethodType { 100 | (middleware: express$Middleware): T; 101 | (...middleware: Array): T; 102 | (path: string|RegExp|string[], ...middleware: Array): T; 103 | } 104 | declare class express$Route { 105 | all: express$RouteMethodType; 106 | get: express$RouteMethodType; 107 | post: express$RouteMethodType; 108 | put: express$RouteMethodType; 109 | head: express$RouteMethodType; 110 | delete: express$RouteMethodType; 111 | options: express$RouteMethodType; 112 | trace: express$RouteMethodType; 113 | copy: express$RouteMethodType; 114 | lock: express$RouteMethodType; 115 | mkcol: express$RouteMethodType; 116 | move: express$RouteMethodType; 117 | purge: express$RouteMethodType; 118 | propfind: express$RouteMethodType; 119 | proppatch: express$RouteMethodType; 120 | unlock: express$RouteMethodType; 121 | report: express$RouteMethodType; 122 | mkactivity: express$RouteMethodType; 123 | checkout: express$RouteMethodType; 124 | merge: express$RouteMethodType; 125 | 126 | // @TODO Missing 'm-search' but get flow illegal name error. 127 | 128 | notify: express$RouteMethodType; 129 | subscribe: express$RouteMethodType; 130 | unsubscribe: express$RouteMethodType; 131 | patch: express$RouteMethodType; 132 | search: express$RouteMethodType; 133 | connect: express$RouteMethodType; 134 | } 135 | 136 | declare class express$Router extends express$Route { 137 | constructor(options?: express$RouterOptions): void; 138 | route(path: string): express$Route; 139 | static (): express$Router; 140 | use(middleware: express$Middleware): this; 141 | use(...middleware: Array): this; 142 | use(path: string|RegExp|string[], ...middleware: Array): this; 143 | use(path: string, router: express$Router): this; 144 | handle(req: http$IncomingMessage, res: http$ServerResponse, next: express$NextFunction): void; 145 | 146 | // Can't use regular callable signature syntax due to https://github.com/facebook/flow/issues/3084 147 | $call: (req: http$IncomingMessage, res: http$ServerResponse, next?: ?express$NextFunction) => void; 148 | } 149 | 150 | declare class express$Application extends express$Router mixins events$EventEmitter { 151 | constructor(): void; 152 | locals: {[name: string]: mixed}; 153 | mountpath: string; 154 | listen(port: number, hostname?: string, backlog?: number, callback?: (err?: ?Error) => mixed): Server; 155 | listen(port: number, hostname?: string, callback?: (err?: ?Error) => mixed): Server; 156 | listen(port: number, callback?: (err?: ?Error) => mixed): Server; 157 | listen(path: string, callback?: (err?: ?Error) => mixed): Server; 158 | listen(handle: Object, callback?: (err?: ?Error) => mixed): Server; 159 | disable(name: string): void; 160 | disabled(name: string): boolean; 161 | enable(name: string): void; 162 | enabled(name: string): boolean; 163 | engine(name: string, callback: Function): void; 164 | /** 165 | * Mixed will not be taken as a value option. Issue around using the GET http method name and the get for settings. 166 | */ 167 | // get(name: string): mixed; 168 | set(name: string, value: mixed): mixed; 169 | render(name: string, optionsOrFunction: {[name: string]: mixed}, callback: express$RenderCallback): void; 170 | handle(req: http$IncomingMessage, res: http$ServerResponse, next?: ?express$NextFunction): void; 171 | } 172 | 173 | declare module 'express' { 174 | declare function serveStatic(root: string, options?: Object): express$Middleware; 175 | 176 | declare type RouterOptions = express$RouterOptions; 177 | declare type CookieOptions = express$CookieOptions; 178 | declare type Middleware = express$Middleware; 179 | declare type NextFunction = express$NextFunction; 180 | declare type $Response = express$Response; 181 | declare type $Request = express$Request; 182 | declare type $Application = express$Application; 183 | 184 | declare module.exports: { 185 | (): express$Application, // If you try to call like a function, it will use this signature 186 | static: serveStatic, // `static` property on the function 187 | Router: typeof express$Router, // `Router` property on the function 188 | }; 189 | } 190 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-core_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 77c4d152e1137221aa029f59aec990bd 2 | // flow-typed version: <>/babel-core_v^6.24.1/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-core' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-core' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-core/lib/api/browser' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-core/lib/api/node' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'babel-core/lib/helpers/get-possible-plugin-names' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'babel-core/lib/helpers/get-possible-preset-names' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'babel-core/lib/helpers/merge' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'babel-core/lib/helpers/normalize-ast' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'babel-core/lib/helpers/resolve-from-possible-names' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'babel-core/lib/helpers/resolve-plugin' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'babel-core/lib/helpers/resolve-preset' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'babel-core/lib/helpers/resolve' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'babel-core/lib/store' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'babel-core/lib/tools/build-external-helpers' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'babel-core/lib/transformation/file/index' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'babel-core/lib/transformation/file/logger' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'babel-core/lib/transformation/file/metadata' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'babel-core/lib/transformation/file/options/build-config-chain' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'babel-core/lib/transformation/file/options/config' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'babel-core/lib/transformation/file/options/index' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'babel-core/lib/transformation/file/options/option-manager' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'babel-core/lib/transformation/file/options/parsers' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module 'babel-core/lib/transformation/file/options/removed' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module 'babel-core/lib/transformation/internal-plugins/block-hoist' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module 'babel-core/lib/transformation/internal-plugins/shadow-functions' { 114 | declare module.exports: any; 115 | } 116 | 117 | declare module 'babel-core/lib/transformation/pipeline' { 118 | declare module.exports: any; 119 | } 120 | 121 | declare module 'babel-core/lib/transformation/plugin-pass' { 122 | declare module.exports: any; 123 | } 124 | 125 | declare module 'babel-core/lib/transformation/plugin' { 126 | declare module.exports: any; 127 | } 128 | 129 | declare module 'babel-core/lib/util' { 130 | declare module.exports: any; 131 | } 132 | 133 | declare module 'babel-core/register' { 134 | declare module.exports: any; 135 | } 136 | 137 | // Filename aliases 138 | declare module 'babel-core/index' { 139 | declare module.exports: $Exports<'babel-core'>; 140 | } 141 | declare module 'babel-core/index.js' { 142 | declare module.exports: $Exports<'babel-core'>; 143 | } 144 | declare module 'babel-core/lib/api/browser.js' { 145 | declare module.exports: $Exports<'babel-core/lib/api/browser'>; 146 | } 147 | declare module 'babel-core/lib/api/node.js' { 148 | declare module.exports: $Exports<'babel-core/lib/api/node'>; 149 | } 150 | declare module 'babel-core/lib/helpers/get-possible-plugin-names.js' { 151 | declare module.exports: $Exports<'babel-core/lib/helpers/get-possible-plugin-names'>; 152 | } 153 | declare module 'babel-core/lib/helpers/get-possible-preset-names.js' { 154 | declare module.exports: $Exports<'babel-core/lib/helpers/get-possible-preset-names'>; 155 | } 156 | declare module 'babel-core/lib/helpers/merge.js' { 157 | declare module.exports: $Exports<'babel-core/lib/helpers/merge'>; 158 | } 159 | declare module 'babel-core/lib/helpers/normalize-ast.js' { 160 | declare module.exports: $Exports<'babel-core/lib/helpers/normalize-ast'>; 161 | } 162 | declare module 'babel-core/lib/helpers/resolve-from-possible-names.js' { 163 | declare module.exports: $Exports<'babel-core/lib/helpers/resolve-from-possible-names'>; 164 | } 165 | declare module 'babel-core/lib/helpers/resolve-plugin.js' { 166 | declare module.exports: $Exports<'babel-core/lib/helpers/resolve-plugin'>; 167 | } 168 | declare module 'babel-core/lib/helpers/resolve-preset.js' { 169 | declare module.exports: $Exports<'babel-core/lib/helpers/resolve-preset'>; 170 | } 171 | declare module 'babel-core/lib/helpers/resolve.js' { 172 | declare module.exports: $Exports<'babel-core/lib/helpers/resolve'>; 173 | } 174 | declare module 'babel-core/lib/store.js' { 175 | declare module.exports: $Exports<'babel-core/lib/store'>; 176 | } 177 | declare module 'babel-core/lib/tools/build-external-helpers.js' { 178 | declare module.exports: $Exports<'babel-core/lib/tools/build-external-helpers'>; 179 | } 180 | declare module 'babel-core/lib/transformation/file/index.js' { 181 | declare module.exports: $Exports<'babel-core/lib/transformation/file/index'>; 182 | } 183 | declare module 'babel-core/lib/transformation/file/logger.js' { 184 | declare module.exports: $Exports<'babel-core/lib/transformation/file/logger'>; 185 | } 186 | declare module 'babel-core/lib/transformation/file/metadata.js' { 187 | declare module.exports: $Exports<'babel-core/lib/transformation/file/metadata'>; 188 | } 189 | declare module 'babel-core/lib/transformation/file/options/build-config-chain.js' { 190 | declare module.exports: $Exports<'babel-core/lib/transformation/file/options/build-config-chain'>; 191 | } 192 | declare module 'babel-core/lib/transformation/file/options/config.js' { 193 | declare module.exports: $Exports<'babel-core/lib/transformation/file/options/config'>; 194 | } 195 | declare module 'babel-core/lib/transformation/file/options/index.js' { 196 | declare module.exports: $Exports<'babel-core/lib/transformation/file/options/index'>; 197 | } 198 | declare module 'babel-core/lib/transformation/file/options/option-manager.js' { 199 | declare module.exports: $Exports<'babel-core/lib/transformation/file/options/option-manager'>; 200 | } 201 | declare module 'babel-core/lib/transformation/file/options/parsers.js' { 202 | declare module.exports: $Exports<'babel-core/lib/transformation/file/options/parsers'>; 203 | } 204 | declare module 'babel-core/lib/transformation/file/options/removed.js' { 205 | declare module.exports: $Exports<'babel-core/lib/transformation/file/options/removed'>; 206 | } 207 | declare module 'babel-core/lib/transformation/internal-plugins/block-hoist.js' { 208 | declare module.exports: $Exports<'babel-core/lib/transformation/internal-plugins/block-hoist'>; 209 | } 210 | declare module 'babel-core/lib/transformation/internal-plugins/shadow-functions.js' { 211 | declare module.exports: $Exports<'babel-core/lib/transformation/internal-plugins/shadow-functions'>; 212 | } 213 | declare module 'babel-core/lib/transformation/pipeline.js' { 214 | declare module.exports: $Exports<'babel-core/lib/transformation/pipeline'>; 215 | } 216 | declare module 'babel-core/lib/transformation/plugin-pass.js' { 217 | declare module.exports: $Exports<'babel-core/lib/transformation/plugin-pass'>; 218 | } 219 | declare module 'babel-core/lib/transformation/plugin.js' { 220 | declare module.exports: $Exports<'babel-core/lib/transformation/plugin'>; 221 | } 222 | declare module 'babel-core/lib/util.js' { 223 | declare module.exports: $Exports<'babel-core/lib/util'>; 224 | } 225 | declare module 'babel-core/register.js' { 226 | declare module.exports: $Exports<'babel-core/register'>; 227 | } 228 | -------------------------------------------------------------------------------- /flow-typed/npm/karma_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: de8d0841f02db19c0b50b5f64b31f12b 2 | // flow-typed version: <>/karma_v^0.13.19/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'karma' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'karma' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'karma/config.tpl' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'karma/gruntfile' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'karma/lib/browser_collection' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'karma/lib/browser_result' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'karma/lib/browser' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'karma/lib/cli' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'karma/lib/completion' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'karma/lib/config' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'karma/lib/constants' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'karma/lib/emitter_wrapper' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'karma/lib/events' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'karma/lib/executor' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'karma/lib/file-list' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'karma/lib/file' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'karma/lib/helper' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'karma/lib/index' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'karma/lib/init' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'karma/lib/init/color_schemes' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'karma/lib/init/formatters' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'karma/lib/init/state_machine' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module 'karma/lib/launcher' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module 'karma/lib/launchers/base' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module 'karma/lib/launchers/capture_timeout' { 114 | declare module.exports: any; 115 | } 116 | 117 | declare module 'karma/lib/launchers/process' { 118 | declare module.exports: any; 119 | } 120 | 121 | declare module 'karma/lib/launchers/retry' { 122 | declare module.exports: any; 123 | } 124 | 125 | declare module 'karma/lib/logger' { 126 | declare module.exports: any; 127 | } 128 | 129 | declare module 'karma/lib/middleware/common' { 130 | declare module.exports: any; 131 | } 132 | 133 | declare module 'karma/lib/middleware/karma' { 134 | declare module.exports: any; 135 | } 136 | 137 | declare module 'karma/lib/middleware/proxy' { 138 | declare module.exports: any; 139 | } 140 | 141 | declare module 'karma/lib/middleware/runner' { 142 | declare module.exports: any; 143 | } 144 | 145 | declare module 'karma/lib/middleware/source_files' { 146 | declare module.exports: any; 147 | } 148 | 149 | declare module 'karma/lib/middleware/strip_host' { 150 | declare module.exports: any; 151 | } 152 | 153 | declare module 'karma/lib/plugin' { 154 | declare module.exports: any; 155 | } 156 | 157 | declare module 'karma/lib/preprocessor' { 158 | declare module.exports: any; 159 | } 160 | 161 | declare module 'karma/lib/reporter' { 162 | declare module.exports: any; 163 | } 164 | 165 | declare module 'karma/lib/reporters/base_color' { 166 | declare module.exports: any; 167 | } 168 | 169 | declare module 'karma/lib/reporters/base' { 170 | declare module.exports: any; 171 | } 172 | 173 | declare module 'karma/lib/reporters/dots_color' { 174 | declare module.exports: any; 175 | } 176 | 177 | declare module 'karma/lib/reporters/dots' { 178 | declare module.exports: any; 179 | } 180 | 181 | declare module 'karma/lib/reporters/multi' { 182 | declare module.exports: any; 183 | } 184 | 185 | declare module 'karma/lib/reporters/progress_color' { 186 | declare module.exports: any; 187 | } 188 | 189 | declare module 'karma/lib/reporters/progress' { 190 | declare module.exports: any; 191 | } 192 | 193 | declare module 'karma/lib/runner' { 194 | declare module.exports: any; 195 | } 196 | 197 | declare module 'karma/lib/server' { 198 | declare module.exports: any; 199 | } 200 | 201 | declare module 'karma/lib/temp_dir' { 202 | declare module.exports: any; 203 | } 204 | 205 | declare module 'karma/lib/url' { 206 | declare module.exports: any; 207 | } 208 | 209 | declare module 'karma/lib/watcher' { 210 | declare module.exports: any; 211 | } 212 | 213 | declare module 'karma/lib/web-server' { 214 | declare module.exports: any; 215 | } 216 | 217 | declare module 'karma/requirejs.config.tpl' { 218 | declare module.exports: any; 219 | } 220 | 221 | declare module 'karma/static/karma' { 222 | declare module.exports: any; 223 | } 224 | 225 | declare module 'karma/wallaby' { 226 | declare module.exports: any; 227 | } 228 | 229 | // Filename aliases 230 | declare module 'karma/config.tpl.js' { 231 | declare module.exports: $Exports<'karma/config.tpl'>; 232 | } 233 | declare module 'karma/gruntfile.js' { 234 | declare module.exports: $Exports<'karma/gruntfile'>; 235 | } 236 | declare module 'karma/lib/browser_collection.js' { 237 | declare module.exports: $Exports<'karma/lib/browser_collection'>; 238 | } 239 | declare module 'karma/lib/browser_result.js' { 240 | declare module.exports: $Exports<'karma/lib/browser_result'>; 241 | } 242 | declare module 'karma/lib/browser.js' { 243 | declare module.exports: $Exports<'karma/lib/browser'>; 244 | } 245 | declare module 'karma/lib/cli.js' { 246 | declare module.exports: $Exports<'karma/lib/cli'>; 247 | } 248 | declare module 'karma/lib/completion.js' { 249 | declare module.exports: $Exports<'karma/lib/completion'>; 250 | } 251 | declare module 'karma/lib/config.js' { 252 | declare module.exports: $Exports<'karma/lib/config'>; 253 | } 254 | declare module 'karma/lib/constants.js' { 255 | declare module.exports: $Exports<'karma/lib/constants'>; 256 | } 257 | declare module 'karma/lib/emitter_wrapper.js' { 258 | declare module.exports: $Exports<'karma/lib/emitter_wrapper'>; 259 | } 260 | declare module 'karma/lib/events.js' { 261 | declare module.exports: $Exports<'karma/lib/events'>; 262 | } 263 | declare module 'karma/lib/executor.js' { 264 | declare module.exports: $Exports<'karma/lib/executor'>; 265 | } 266 | declare module 'karma/lib/file-list.js' { 267 | declare module.exports: $Exports<'karma/lib/file-list'>; 268 | } 269 | declare module 'karma/lib/file.js' { 270 | declare module.exports: $Exports<'karma/lib/file'>; 271 | } 272 | declare module 'karma/lib/helper.js' { 273 | declare module.exports: $Exports<'karma/lib/helper'>; 274 | } 275 | declare module 'karma/lib/index.js' { 276 | declare module.exports: $Exports<'karma/lib/index'>; 277 | } 278 | declare module 'karma/lib/init.js' { 279 | declare module.exports: $Exports<'karma/lib/init'>; 280 | } 281 | declare module 'karma/lib/init/color_schemes.js' { 282 | declare module.exports: $Exports<'karma/lib/init/color_schemes'>; 283 | } 284 | declare module 'karma/lib/init/formatters.js' { 285 | declare module.exports: $Exports<'karma/lib/init/formatters'>; 286 | } 287 | declare module 'karma/lib/init/state_machine.js' { 288 | declare module.exports: $Exports<'karma/lib/init/state_machine'>; 289 | } 290 | declare module 'karma/lib/launcher.js' { 291 | declare module.exports: $Exports<'karma/lib/launcher'>; 292 | } 293 | declare module 'karma/lib/launchers/base.js' { 294 | declare module.exports: $Exports<'karma/lib/launchers/base'>; 295 | } 296 | declare module 'karma/lib/launchers/capture_timeout.js' { 297 | declare module.exports: $Exports<'karma/lib/launchers/capture_timeout'>; 298 | } 299 | declare module 'karma/lib/launchers/process.js' { 300 | declare module.exports: $Exports<'karma/lib/launchers/process'>; 301 | } 302 | declare module 'karma/lib/launchers/retry.js' { 303 | declare module.exports: $Exports<'karma/lib/launchers/retry'>; 304 | } 305 | declare module 'karma/lib/logger.js' { 306 | declare module.exports: $Exports<'karma/lib/logger'>; 307 | } 308 | declare module 'karma/lib/middleware/common.js' { 309 | declare module.exports: $Exports<'karma/lib/middleware/common'>; 310 | } 311 | declare module 'karma/lib/middleware/karma.js' { 312 | declare module.exports: $Exports<'karma/lib/middleware/karma'>; 313 | } 314 | declare module 'karma/lib/middleware/proxy.js' { 315 | declare module.exports: $Exports<'karma/lib/middleware/proxy'>; 316 | } 317 | declare module 'karma/lib/middleware/runner.js' { 318 | declare module.exports: $Exports<'karma/lib/middleware/runner'>; 319 | } 320 | declare module 'karma/lib/middleware/source_files.js' { 321 | declare module.exports: $Exports<'karma/lib/middleware/source_files'>; 322 | } 323 | declare module 'karma/lib/middleware/strip_host.js' { 324 | declare module.exports: $Exports<'karma/lib/middleware/strip_host'>; 325 | } 326 | declare module 'karma/lib/plugin.js' { 327 | declare module.exports: $Exports<'karma/lib/plugin'>; 328 | } 329 | declare module 'karma/lib/preprocessor.js' { 330 | declare module.exports: $Exports<'karma/lib/preprocessor'>; 331 | } 332 | declare module 'karma/lib/reporter.js' { 333 | declare module.exports: $Exports<'karma/lib/reporter'>; 334 | } 335 | declare module 'karma/lib/reporters/base_color.js' { 336 | declare module.exports: $Exports<'karma/lib/reporters/base_color'>; 337 | } 338 | declare module 'karma/lib/reporters/base.js' { 339 | declare module.exports: $Exports<'karma/lib/reporters/base'>; 340 | } 341 | declare module 'karma/lib/reporters/dots_color.js' { 342 | declare module.exports: $Exports<'karma/lib/reporters/dots_color'>; 343 | } 344 | declare module 'karma/lib/reporters/dots.js' { 345 | declare module.exports: $Exports<'karma/lib/reporters/dots'>; 346 | } 347 | declare module 'karma/lib/reporters/multi.js' { 348 | declare module.exports: $Exports<'karma/lib/reporters/multi'>; 349 | } 350 | declare module 'karma/lib/reporters/progress_color.js' { 351 | declare module.exports: $Exports<'karma/lib/reporters/progress_color'>; 352 | } 353 | declare module 'karma/lib/reporters/progress.js' { 354 | declare module.exports: $Exports<'karma/lib/reporters/progress'>; 355 | } 356 | declare module 'karma/lib/runner.js' { 357 | declare module.exports: $Exports<'karma/lib/runner'>; 358 | } 359 | declare module 'karma/lib/server.js' { 360 | declare module.exports: $Exports<'karma/lib/server'>; 361 | } 362 | declare module 'karma/lib/temp_dir.js' { 363 | declare module.exports: $Exports<'karma/lib/temp_dir'>; 364 | } 365 | declare module 'karma/lib/url.js' { 366 | declare module.exports: $Exports<'karma/lib/url'>; 367 | } 368 | declare module 'karma/lib/watcher.js' { 369 | declare module.exports: $Exports<'karma/lib/watcher'>; 370 | } 371 | declare module 'karma/lib/web-server.js' { 372 | declare module.exports: $Exports<'karma/lib/web-server'>; 373 | } 374 | declare module 'karma/requirejs.config.tpl.js' { 375 | declare module.exports: $Exports<'karma/requirejs.config.tpl'>; 376 | } 377 | declare module 'karma/static/karma.js' { 378 | declare module.exports: $Exports<'karma/static/karma'>; 379 | } 380 | declare module 'karma/wallaby.js' { 381 | declare module.exports: $Exports<'karma/wallaby'>; 382 | } 383 | -------------------------------------------------------------------------------- /flow-typed/npm/babel-istanbul_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: b304455593e0dc6136f8aca370c8206c 2 | // flow-typed version: <>/babel-istanbul_v^0.6.0/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'babel-istanbul' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'babel-istanbul' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'babel-istanbul/lib/assets/sorter' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'babel-istanbul/lib/assets/vendor/prettify' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'babel-istanbul/lib/cli' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'babel-istanbul/lib/collector' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'babel-istanbul/lib/command/check-coverage' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'babel-istanbul/lib/command/common/run-with-cover' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'babel-istanbul/lib/command/cover' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'babel-istanbul/lib/command/help' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'babel-istanbul/lib/command/index' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'babel-istanbul/lib/command/instrument' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'babel-istanbul/lib/command/report' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'babel-istanbul/lib/command/test' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'babel-istanbul/lib/config' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'babel-istanbul/lib/hook' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'babel-istanbul/lib/instrumenter' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'babel-istanbul/lib/object-utils' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'babel-istanbul/lib/register-plugins' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'babel-istanbul/lib/report/clover' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'babel-istanbul/lib/report/cobertura' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'babel-istanbul/lib/report/common/defaults' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module 'babel-istanbul/lib/report/html' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module 'babel-istanbul/lib/report/index' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module 'babel-istanbul/lib/report/json-summary' { 114 | declare module.exports: any; 115 | } 116 | 117 | declare module 'babel-istanbul/lib/report/json' { 118 | declare module.exports: any; 119 | } 120 | 121 | declare module 'babel-istanbul/lib/report/lcov' { 122 | declare module.exports: any; 123 | } 124 | 125 | declare module 'babel-istanbul/lib/report/lcovonly' { 126 | declare module.exports: any; 127 | } 128 | 129 | declare module 'babel-istanbul/lib/report/none' { 130 | declare module.exports: any; 131 | } 132 | 133 | declare module 'babel-istanbul/lib/report/teamcity' { 134 | declare module.exports: any; 135 | } 136 | 137 | declare module 'babel-istanbul/lib/report/text-lcov' { 138 | declare module.exports: any; 139 | } 140 | 141 | declare module 'babel-istanbul/lib/report/text-summary' { 142 | declare module.exports: any; 143 | } 144 | 145 | declare module 'babel-istanbul/lib/report/text' { 146 | declare module.exports: any; 147 | } 148 | 149 | declare module 'babel-istanbul/lib/reporter' { 150 | declare module.exports: any; 151 | } 152 | 153 | declare module 'babel-istanbul/lib/store/fslookup' { 154 | declare module.exports: any; 155 | } 156 | 157 | declare module 'babel-istanbul/lib/store/index' { 158 | declare module.exports: any; 159 | } 160 | 161 | declare module 'babel-istanbul/lib/store/memory' { 162 | declare module.exports: any; 163 | } 164 | 165 | declare module 'babel-istanbul/lib/store/tmp' { 166 | declare module.exports: any; 167 | } 168 | 169 | declare module 'babel-istanbul/lib/util/factory' { 170 | declare module.exports: any; 171 | } 172 | 173 | declare module 'babel-istanbul/lib/util/file-matcher' { 174 | declare module.exports: any; 175 | } 176 | 177 | declare module 'babel-istanbul/lib/util/file-writer' { 178 | declare module.exports: any; 179 | } 180 | 181 | declare module 'babel-istanbul/lib/util/help-formatter' { 182 | declare module.exports: any; 183 | } 184 | 185 | declare module 'babel-istanbul/lib/util/input-error' { 186 | declare module.exports: any; 187 | } 188 | 189 | declare module 'babel-istanbul/lib/util/insertion-text' { 190 | declare module.exports: any; 191 | } 192 | 193 | declare module 'babel-istanbul/lib/util/meta' { 194 | declare module.exports: any; 195 | } 196 | 197 | declare module 'babel-istanbul/lib/util/tree-summarizer' { 198 | declare module.exports: any; 199 | } 200 | 201 | declare module 'babel-istanbul/lib/util/writer' { 202 | declare module.exports: any; 203 | } 204 | 205 | declare module 'babel-istanbul/lib/util/yui-load-hook' { 206 | declare module.exports: any; 207 | } 208 | 209 | // Filename aliases 210 | declare module 'babel-istanbul/index' { 211 | declare module.exports: $Exports<'babel-istanbul'>; 212 | } 213 | declare module 'babel-istanbul/index.js' { 214 | declare module.exports: $Exports<'babel-istanbul'>; 215 | } 216 | declare module 'babel-istanbul/lib/assets/sorter.js' { 217 | declare module.exports: $Exports<'babel-istanbul/lib/assets/sorter'>; 218 | } 219 | declare module 'babel-istanbul/lib/assets/vendor/prettify.js' { 220 | declare module.exports: $Exports<'babel-istanbul/lib/assets/vendor/prettify'>; 221 | } 222 | declare module 'babel-istanbul/lib/cli.js' { 223 | declare module.exports: $Exports<'babel-istanbul/lib/cli'>; 224 | } 225 | declare module 'babel-istanbul/lib/collector.js' { 226 | declare module.exports: $Exports<'babel-istanbul/lib/collector'>; 227 | } 228 | declare module 'babel-istanbul/lib/command/check-coverage.js' { 229 | declare module.exports: $Exports<'babel-istanbul/lib/command/check-coverage'>; 230 | } 231 | declare module 'babel-istanbul/lib/command/common/run-with-cover.js' { 232 | declare module.exports: $Exports<'babel-istanbul/lib/command/common/run-with-cover'>; 233 | } 234 | declare module 'babel-istanbul/lib/command/cover.js' { 235 | declare module.exports: $Exports<'babel-istanbul/lib/command/cover'>; 236 | } 237 | declare module 'babel-istanbul/lib/command/help.js' { 238 | declare module.exports: $Exports<'babel-istanbul/lib/command/help'>; 239 | } 240 | declare module 'babel-istanbul/lib/command/index.js' { 241 | declare module.exports: $Exports<'babel-istanbul/lib/command/index'>; 242 | } 243 | declare module 'babel-istanbul/lib/command/instrument.js' { 244 | declare module.exports: $Exports<'babel-istanbul/lib/command/instrument'>; 245 | } 246 | declare module 'babel-istanbul/lib/command/report.js' { 247 | declare module.exports: $Exports<'babel-istanbul/lib/command/report'>; 248 | } 249 | declare module 'babel-istanbul/lib/command/test.js' { 250 | declare module.exports: $Exports<'babel-istanbul/lib/command/test'>; 251 | } 252 | declare module 'babel-istanbul/lib/config.js' { 253 | declare module.exports: $Exports<'babel-istanbul/lib/config'>; 254 | } 255 | declare module 'babel-istanbul/lib/hook.js' { 256 | declare module.exports: $Exports<'babel-istanbul/lib/hook'>; 257 | } 258 | declare module 'babel-istanbul/lib/instrumenter.js' { 259 | declare module.exports: $Exports<'babel-istanbul/lib/instrumenter'>; 260 | } 261 | declare module 'babel-istanbul/lib/object-utils.js' { 262 | declare module.exports: $Exports<'babel-istanbul/lib/object-utils'>; 263 | } 264 | declare module 'babel-istanbul/lib/register-plugins.js' { 265 | declare module.exports: $Exports<'babel-istanbul/lib/register-plugins'>; 266 | } 267 | declare module 'babel-istanbul/lib/report/clover.js' { 268 | declare module.exports: $Exports<'babel-istanbul/lib/report/clover'>; 269 | } 270 | declare module 'babel-istanbul/lib/report/cobertura.js' { 271 | declare module.exports: $Exports<'babel-istanbul/lib/report/cobertura'>; 272 | } 273 | declare module 'babel-istanbul/lib/report/common/defaults.js' { 274 | declare module.exports: $Exports<'babel-istanbul/lib/report/common/defaults'>; 275 | } 276 | declare module 'babel-istanbul/lib/report/html.js' { 277 | declare module.exports: $Exports<'babel-istanbul/lib/report/html'>; 278 | } 279 | declare module 'babel-istanbul/lib/report/index.js' { 280 | declare module.exports: $Exports<'babel-istanbul/lib/report/index'>; 281 | } 282 | declare module 'babel-istanbul/lib/report/json-summary.js' { 283 | declare module.exports: $Exports<'babel-istanbul/lib/report/json-summary'>; 284 | } 285 | declare module 'babel-istanbul/lib/report/json.js' { 286 | declare module.exports: $Exports<'babel-istanbul/lib/report/json'>; 287 | } 288 | declare module 'babel-istanbul/lib/report/lcov.js' { 289 | declare module.exports: $Exports<'babel-istanbul/lib/report/lcov'>; 290 | } 291 | declare module 'babel-istanbul/lib/report/lcovonly.js' { 292 | declare module.exports: $Exports<'babel-istanbul/lib/report/lcovonly'>; 293 | } 294 | declare module 'babel-istanbul/lib/report/none.js' { 295 | declare module.exports: $Exports<'babel-istanbul/lib/report/none'>; 296 | } 297 | declare module 'babel-istanbul/lib/report/teamcity.js' { 298 | declare module.exports: $Exports<'babel-istanbul/lib/report/teamcity'>; 299 | } 300 | declare module 'babel-istanbul/lib/report/text-lcov.js' { 301 | declare module.exports: $Exports<'babel-istanbul/lib/report/text-lcov'>; 302 | } 303 | declare module 'babel-istanbul/lib/report/text-summary.js' { 304 | declare module.exports: $Exports<'babel-istanbul/lib/report/text-summary'>; 305 | } 306 | declare module 'babel-istanbul/lib/report/text.js' { 307 | declare module.exports: $Exports<'babel-istanbul/lib/report/text'>; 308 | } 309 | declare module 'babel-istanbul/lib/reporter.js' { 310 | declare module.exports: $Exports<'babel-istanbul/lib/reporter'>; 311 | } 312 | declare module 'babel-istanbul/lib/store/fslookup.js' { 313 | declare module.exports: $Exports<'babel-istanbul/lib/store/fslookup'>; 314 | } 315 | declare module 'babel-istanbul/lib/store/index.js' { 316 | declare module.exports: $Exports<'babel-istanbul/lib/store/index'>; 317 | } 318 | declare module 'babel-istanbul/lib/store/memory.js' { 319 | declare module.exports: $Exports<'babel-istanbul/lib/store/memory'>; 320 | } 321 | declare module 'babel-istanbul/lib/store/tmp.js' { 322 | declare module.exports: $Exports<'babel-istanbul/lib/store/tmp'>; 323 | } 324 | declare module 'babel-istanbul/lib/util/factory.js' { 325 | declare module.exports: $Exports<'babel-istanbul/lib/util/factory'>; 326 | } 327 | declare module 'babel-istanbul/lib/util/file-matcher.js' { 328 | declare module.exports: $Exports<'babel-istanbul/lib/util/file-matcher'>; 329 | } 330 | declare module 'babel-istanbul/lib/util/file-writer.js' { 331 | declare module.exports: $Exports<'babel-istanbul/lib/util/file-writer'>; 332 | } 333 | declare module 'babel-istanbul/lib/util/help-formatter.js' { 334 | declare module.exports: $Exports<'babel-istanbul/lib/util/help-formatter'>; 335 | } 336 | declare module 'babel-istanbul/lib/util/input-error.js' { 337 | declare module.exports: $Exports<'babel-istanbul/lib/util/input-error'>; 338 | } 339 | declare module 'babel-istanbul/lib/util/insertion-text.js' { 340 | declare module.exports: $Exports<'babel-istanbul/lib/util/insertion-text'>; 341 | } 342 | declare module 'babel-istanbul/lib/util/meta.js' { 343 | declare module.exports: $Exports<'babel-istanbul/lib/util/meta'>; 344 | } 345 | declare module 'babel-istanbul/lib/util/tree-summarizer.js' { 346 | declare module.exports: $Exports<'babel-istanbul/lib/util/tree-summarizer'>; 347 | } 348 | declare module 'babel-istanbul/lib/util/writer.js' { 349 | declare module.exports: $Exports<'babel-istanbul/lib/util/writer'>; 350 | } 351 | declare module 'babel-istanbul/lib/util/yui-load-hook.js' { 352 | declare module.exports: $Exports<'babel-istanbul/lib/util/yui-load-hook'>; 353 | } 354 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-plugin-import_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: e2987476975b62f71913513e2b9f28e9 2 | // flow-typed version: <>/eslint-plugin-import_v^2.2.0/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-plugin-import' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-plugin-import' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'eslint-plugin-import/config/electron' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'eslint-plugin-import/config/errors' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'eslint-plugin-import/config/react-native' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'eslint-plugin-import/config/react' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'eslint-plugin-import/config/recommended' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'eslint-plugin-import/config/stage-0' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'eslint-plugin-import/config/warnings' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'eslint-plugin-import/lib/core/importType' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'eslint-plugin-import/lib/core/staticRequire' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'eslint-plugin-import/lib/ExportMap' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'eslint-plugin-import/lib/importDeclaration' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'eslint-plugin-import/lib/index' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'eslint-plugin-import/lib/rules/default' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'eslint-plugin-import/lib/rules/export' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'eslint-plugin-import/lib/rules/extensions' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'eslint-plugin-import/lib/rules/first' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'eslint-plugin-import/lib/rules/imports-first' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'eslint-plugin-import/lib/rules/max-dependencies' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'eslint-plugin-import/lib/rules/named' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'eslint-plugin-import/lib/rules/namespace' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module 'eslint-plugin-import/lib/rules/newline-after-import' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module 'eslint-plugin-import/lib/rules/no-absolute-path' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module 'eslint-plugin-import/lib/rules/no-amd' { 114 | declare module.exports: any; 115 | } 116 | 117 | declare module 'eslint-plugin-import/lib/rules/no-anonymous-default-export' { 118 | declare module.exports: any; 119 | } 120 | 121 | declare module 'eslint-plugin-import/lib/rules/no-commonjs' { 122 | declare module.exports: any; 123 | } 124 | 125 | declare module 'eslint-plugin-import/lib/rules/no-deprecated' { 126 | declare module.exports: any; 127 | } 128 | 129 | declare module 'eslint-plugin-import/lib/rules/no-duplicates' { 130 | declare module.exports: any; 131 | } 132 | 133 | declare module 'eslint-plugin-import/lib/rules/no-dynamic-require' { 134 | declare module.exports: any; 135 | } 136 | 137 | declare module 'eslint-plugin-import/lib/rules/no-extraneous-dependencies' { 138 | declare module.exports: any; 139 | } 140 | 141 | declare module 'eslint-plugin-import/lib/rules/no-internal-modules' { 142 | declare module.exports: any; 143 | } 144 | 145 | declare module 'eslint-plugin-import/lib/rules/no-mutable-exports' { 146 | declare module.exports: any; 147 | } 148 | 149 | declare module 'eslint-plugin-import/lib/rules/no-named-as-default-member' { 150 | declare module.exports: any; 151 | } 152 | 153 | declare module 'eslint-plugin-import/lib/rules/no-named-as-default' { 154 | declare module.exports: any; 155 | } 156 | 157 | declare module 'eslint-plugin-import/lib/rules/no-named-default' { 158 | declare module.exports: any; 159 | } 160 | 161 | declare module 'eslint-plugin-import/lib/rules/no-namespace' { 162 | declare module.exports: any; 163 | } 164 | 165 | declare module 'eslint-plugin-import/lib/rules/no-nodejs-modules' { 166 | declare module.exports: any; 167 | } 168 | 169 | declare module 'eslint-plugin-import/lib/rules/no-restricted-paths' { 170 | declare module.exports: any; 171 | } 172 | 173 | declare module 'eslint-plugin-import/lib/rules/no-unassigned-import' { 174 | declare module.exports: any; 175 | } 176 | 177 | declare module 'eslint-plugin-import/lib/rules/no-unresolved' { 178 | declare module.exports: any; 179 | } 180 | 181 | declare module 'eslint-plugin-import/lib/rules/no-webpack-loader-syntax' { 182 | declare module.exports: any; 183 | } 184 | 185 | declare module 'eslint-plugin-import/lib/rules/order' { 186 | declare module.exports: any; 187 | } 188 | 189 | declare module 'eslint-plugin-import/lib/rules/prefer-default-export' { 190 | declare module.exports: any; 191 | } 192 | 193 | declare module 'eslint-plugin-import/lib/rules/unambiguous' { 194 | declare module.exports: any; 195 | } 196 | 197 | declare module 'eslint-plugin-import/memo-parser/index' { 198 | declare module.exports: any; 199 | } 200 | 201 | // Filename aliases 202 | declare module 'eslint-plugin-import/config/electron.js' { 203 | declare module.exports: $Exports<'eslint-plugin-import/config/electron'>; 204 | } 205 | declare module 'eslint-plugin-import/config/errors.js' { 206 | declare module.exports: $Exports<'eslint-plugin-import/config/errors'>; 207 | } 208 | declare module 'eslint-plugin-import/config/react-native.js' { 209 | declare module.exports: $Exports<'eslint-plugin-import/config/react-native'>; 210 | } 211 | declare module 'eslint-plugin-import/config/react.js' { 212 | declare module.exports: $Exports<'eslint-plugin-import/config/react'>; 213 | } 214 | declare module 'eslint-plugin-import/config/recommended.js' { 215 | declare module.exports: $Exports<'eslint-plugin-import/config/recommended'>; 216 | } 217 | declare module 'eslint-plugin-import/config/stage-0.js' { 218 | declare module.exports: $Exports<'eslint-plugin-import/config/stage-0'>; 219 | } 220 | declare module 'eslint-plugin-import/config/warnings.js' { 221 | declare module.exports: $Exports<'eslint-plugin-import/config/warnings'>; 222 | } 223 | declare module 'eslint-plugin-import/lib/core/importType.js' { 224 | declare module.exports: $Exports<'eslint-plugin-import/lib/core/importType'>; 225 | } 226 | declare module 'eslint-plugin-import/lib/core/staticRequire.js' { 227 | declare module.exports: $Exports<'eslint-plugin-import/lib/core/staticRequire'>; 228 | } 229 | declare module 'eslint-plugin-import/lib/ExportMap.js' { 230 | declare module.exports: $Exports<'eslint-plugin-import/lib/ExportMap'>; 231 | } 232 | declare module 'eslint-plugin-import/lib/importDeclaration.js' { 233 | declare module.exports: $Exports<'eslint-plugin-import/lib/importDeclaration'>; 234 | } 235 | declare module 'eslint-plugin-import/lib/index.js' { 236 | declare module.exports: $Exports<'eslint-plugin-import/lib/index'>; 237 | } 238 | declare module 'eslint-plugin-import/lib/rules/default.js' { 239 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/default'>; 240 | } 241 | declare module 'eslint-plugin-import/lib/rules/export.js' { 242 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/export'>; 243 | } 244 | declare module 'eslint-plugin-import/lib/rules/extensions.js' { 245 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/extensions'>; 246 | } 247 | declare module 'eslint-plugin-import/lib/rules/first.js' { 248 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/first'>; 249 | } 250 | declare module 'eslint-plugin-import/lib/rules/imports-first.js' { 251 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/imports-first'>; 252 | } 253 | declare module 'eslint-plugin-import/lib/rules/max-dependencies.js' { 254 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/max-dependencies'>; 255 | } 256 | declare module 'eslint-plugin-import/lib/rules/named.js' { 257 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/named'>; 258 | } 259 | declare module 'eslint-plugin-import/lib/rules/namespace.js' { 260 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/namespace'>; 261 | } 262 | declare module 'eslint-plugin-import/lib/rules/newline-after-import.js' { 263 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/newline-after-import'>; 264 | } 265 | declare module 'eslint-plugin-import/lib/rules/no-absolute-path.js' { 266 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-absolute-path'>; 267 | } 268 | declare module 'eslint-plugin-import/lib/rules/no-amd.js' { 269 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-amd'>; 270 | } 271 | declare module 'eslint-plugin-import/lib/rules/no-anonymous-default-export.js' { 272 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-anonymous-default-export'>; 273 | } 274 | declare module 'eslint-plugin-import/lib/rules/no-commonjs.js' { 275 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-commonjs'>; 276 | } 277 | declare module 'eslint-plugin-import/lib/rules/no-deprecated.js' { 278 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-deprecated'>; 279 | } 280 | declare module 'eslint-plugin-import/lib/rules/no-duplicates.js' { 281 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-duplicates'>; 282 | } 283 | declare module 'eslint-plugin-import/lib/rules/no-dynamic-require.js' { 284 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-dynamic-require'>; 285 | } 286 | declare module 'eslint-plugin-import/lib/rules/no-extraneous-dependencies.js' { 287 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-extraneous-dependencies'>; 288 | } 289 | declare module 'eslint-plugin-import/lib/rules/no-internal-modules.js' { 290 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-internal-modules'>; 291 | } 292 | declare module 'eslint-plugin-import/lib/rules/no-mutable-exports.js' { 293 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-mutable-exports'>; 294 | } 295 | declare module 'eslint-plugin-import/lib/rules/no-named-as-default-member.js' { 296 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-named-as-default-member'>; 297 | } 298 | declare module 'eslint-plugin-import/lib/rules/no-named-as-default.js' { 299 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-named-as-default'>; 300 | } 301 | declare module 'eslint-plugin-import/lib/rules/no-named-default.js' { 302 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-named-default'>; 303 | } 304 | declare module 'eslint-plugin-import/lib/rules/no-namespace.js' { 305 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-namespace'>; 306 | } 307 | declare module 'eslint-plugin-import/lib/rules/no-nodejs-modules.js' { 308 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-nodejs-modules'>; 309 | } 310 | declare module 'eslint-plugin-import/lib/rules/no-restricted-paths.js' { 311 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-restricted-paths'>; 312 | } 313 | declare module 'eslint-plugin-import/lib/rules/no-unassigned-import.js' { 314 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-unassigned-import'>; 315 | } 316 | declare module 'eslint-plugin-import/lib/rules/no-unresolved.js' { 317 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-unresolved'>; 318 | } 319 | declare module 'eslint-plugin-import/lib/rules/no-webpack-loader-syntax.js' { 320 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/no-webpack-loader-syntax'>; 321 | } 322 | declare module 'eslint-plugin-import/lib/rules/order.js' { 323 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/order'>; 324 | } 325 | declare module 'eslint-plugin-import/lib/rules/prefer-default-export.js' { 326 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/prefer-default-export'>; 327 | } 328 | declare module 'eslint-plugin-import/lib/rules/unambiguous.js' { 329 | declare module.exports: $Exports<'eslint-plugin-import/lib/rules/unambiguous'>; 330 | } 331 | declare module 'eslint-plugin-import/memo-parser/index.js' { 332 | declare module.exports: $Exports<'eslint-plugin-import/memo-parser/index'>; 333 | } 334 | -------------------------------------------------------------------------------- /flow-typed/npm/eslint-plugin-react_vx.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: ff6093c8d93992c879ed81562e8109d3 2 | // flow-typed version: <>/eslint-plugin-react_v^7.0.1/flow_v0.47.0 3 | 4 | /** 5 | * This is an autogenerated libdef stub for: 6 | * 7 | * 'eslint-plugin-react' 8 | * 9 | * Fill this stub out by replacing all the `any` types. 10 | * 11 | * Once filled out, we encourage you to share your work with the 12 | * community by sending a pull request to: 13 | * https://github.com/flowtype/flow-typed 14 | */ 15 | 16 | declare module 'eslint-plugin-react' { 17 | declare module.exports: any; 18 | } 19 | 20 | /** 21 | * We include stubs for each file inside this npm package in case you need to 22 | * require those files directly. Feel free to delete any files that aren't 23 | * needed. 24 | */ 25 | declare module 'eslint-plugin-react/lib/rules/display-name' { 26 | declare module.exports: any; 27 | } 28 | 29 | declare module 'eslint-plugin-react/lib/rules/forbid-component-props' { 30 | declare module.exports: any; 31 | } 32 | 33 | declare module 'eslint-plugin-react/lib/rules/forbid-elements' { 34 | declare module.exports: any; 35 | } 36 | 37 | declare module 'eslint-plugin-react/lib/rules/forbid-foreign-prop-types' { 38 | declare module.exports: any; 39 | } 40 | 41 | declare module 'eslint-plugin-react/lib/rules/forbid-prop-types' { 42 | declare module.exports: any; 43 | } 44 | 45 | declare module 'eslint-plugin-react/lib/rules/jsx-boolean-value' { 46 | declare module.exports: any; 47 | } 48 | 49 | declare module 'eslint-plugin-react/lib/rules/jsx-closing-bracket-location' { 50 | declare module.exports: any; 51 | } 52 | 53 | declare module 'eslint-plugin-react/lib/rules/jsx-curly-spacing' { 54 | declare module.exports: any; 55 | } 56 | 57 | declare module 'eslint-plugin-react/lib/rules/jsx-equals-spacing' { 58 | declare module.exports: any; 59 | } 60 | 61 | declare module 'eslint-plugin-react/lib/rules/jsx-filename-extension' { 62 | declare module.exports: any; 63 | } 64 | 65 | declare module 'eslint-plugin-react/lib/rules/jsx-first-prop-new-line' { 66 | declare module.exports: any; 67 | } 68 | 69 | declare module 'eslint-plugin-react/lib/rules/jsx-handler-names' { 70 | declare module.exports: any; 71 | } 72 | 73 | declare module 'eslint-plugin-react/lib/rules/jsx-indent-props' { 74 | declare module.exports: any; 75 | } 76 | 77 | declare module 'eslint-plugin-react/lib/rules/jsx-indent' { 78 | declare module.exports: any; 79 | } 80 | 81 | declare module 'eslint-plugin-react/lib/rules/jsx-key' { 82 | declare module.exports: any; 83 | } 84 | 85 | declare module 'eslint-plugin-react/lib/rules/jsx-max-props-per-line' { 86 | declare module.exports: any; 87 | } 88 | 89 | declare module 'eslint-plugin-react/lib/rules/jsx-no-bind' { 90 | declare module.exports: any; 91 | } 92 | 93 | declare module 'eslint-plugin-react/lib/rules/jsx-no-comment-textnodes' { 94 | declare module.exports: any; 95 | } 96 | 97 | declare module 'eslint-plugin-react/lib/rules/jsx-no-duplicate-props' { 98 | declare module.exports: any; 99 | } 100 | 101 | declare module 'eslint-plugin-react/lib/rules/jsx-no-literals' { 102 | declare module.exports: any; 103 | } 104 | 105 | declare module 'eslint-plugin-react/lib/rules/jsx-no-target-blank' { 106 | declare module.exports: any; 107 | } 108 | 109 | declare module 'eslint-plugin-react/lib/rules/jsx-no-undef' { 110 | declare module.exports: any; 111 | } 112 | 113 | declare module 'eslint-plugin-react/lib/rules/jsx-pascal-case' { 114 | declare module.exports: any; 115 | } 116 | 117 | declare module 'eslint-plugin-react/lib/rules/jsx-sort-props' { 118 | declare module.exports: any; 119 | } 120 | 121 | declare module 'eslint-plugin-react/lib/rules/jsx-space-before-closing' { 122 | declare module.exports: any; 123 | } 124 | 125 | declare module 'eslint-plugin-react/lib/rules/jsx-tag-spacing' { 126 | declare module.exports: any; 127 | } 128 | 129 | declare module 'eslint-plugin-react/lib/rules/jsx-uses-react' { 130 | declare module.exports: any; 131 | } 132 | 133 | declare module 'eslint-plugin-react/lib/rules/jsx-uses-vars' { 134 | declare module.exports: any; 135 | } 136 | 137 | declare module 'eslint-plugin-react/lib/rules/jsx-wrap-multilines' { 138 | declare module.exports: any; 139 | } 140 | 141 | declare module 'eslint-plugin-react/lib/rules/no-array-index-key' { 142 | declare module.exports: any; 143 | } 144 | 145 | declare module 'eslint-plugin-react/lib/rules/no-children-prop' { 146 | declare module.exports: any; 147 | } 148 | 149 | declare module 'eslint-plugin-react/lib/rules/no-danger-with-children' { 150 | declare module.exports: any; 151 | } 152 | 153 | declare module 'eslint-plugin-react/lib/rules/no-danger' { 154 | declare module.exports: any; 155 | } 156 | 157 | declare module 'eslint-plugin-react/lib/rules/no-deprecated' { 158 | declare module.exports: any; 159 | } 160 | 161 | declare module 'eslint-plugin-react/lib/rules/no-did-mount-set-state' { 162 | declare module.exports: any; 163 | } 164 | 165 | declare module 'eslint-plugin-react/lib/rules/no-did-update-set-state' { 166 | declare module.exports: any; 167 | } 168 | 169 | declare module 'eslint-plugin-react/lib/rules/no-direct-mutation-state' { 170 | declare module.exports: any; 171 | } 172 | 173 | declare module 'eslint-plugin-react/lib/rules/no-find-dom-node' { 174 | declare module.exports: any; 175 | } 176 | 177 | declare module 'eslint-plugin-react/lib/rules/no-is-mounted' { 178 | declare module.exports: any; 179 | } 180 | 181 | declare module 'eslint-plugin-react/lib/rules/no-multi-comp' { 182 | declare module.exports: any; 183 | } 184 | 185 | declare module 'eslint-plugin-react/lib/rules/no-render-return-value' { 186 | declare module.exports: any; 187 | } 188 | 189 | declare module 'eslint-plugin-react/lib/rules/no-set-state' { 190 | declare module.exports: any; 191 | } 192 | 193 | declare module 'eslint-plugin-react/lib/rules/no-string-refs' { 194 | declare module.exports: any; 195 | } 196 | 197 | declare module 'eslint-plugin-react/lib/rules/no-unescaped-entities' { 198 | declare module.exports: any; 199 | } 200 | 201 | declare module 'eslint-plugin-react/lib/rules/no-unknown-property' { 202 | declare module.exports: any; 203 | } 204 | 205 | declare module 'eslint-plugin-react/lib/rules/no-unused-prop-types' { 206 | declare module.exports: any; 207 | } 208 | 209 | declare module 'eslint-plugin-react/lib/rules/no-will-update-set-state' { 210 | declare module.exports: any; 211 | } 212 | 213 | declare module 'eslint-plugin-react/lib/rules/prefer-es6-class' { 214 | declare module.exports: any; 215 | } 216 | 217 | declare module 'eslint-plugin-react/lib/rules/prefer-stateless-function' { 218 | declare module.exports: any; 219 | } 220 | 221 | declare module 'eslint-plugin-react/lib/rules/prop-types' { 222 | declare module.exports: any; 223 | } 224 | 225 | declare module 'eslint-plugin-react/lib/rules/react-in-jsx-scope' { 226 | declare module.exports: any; 227 | } 228 | 229 | declare module 'eslint-plugin-react/lib/rules/require-default-props' { 230 | declare module.exports: any; 231 | } 232 | 233 | declare module 'eslint-plugin-react/lib/rules/require-optimization' { 234 | declare module.exports: any; 235 | } 236 | 237 | declare module 'eslint-plugin-react/lib/rules/require-render-return' { 238 | declare module.exports: any; 239 | } 240 | 241 | declare module 'eslint-plugin-react/lib/rules/self-closing-comp' { 242 | declare module.exports: any; 243 | } 244 | 245 | declare module 'eslint-plugin-react/lib/rules/sort-comp' { 246 | declare module.exports: any; 247 | } 248 | 249 | declare module 'eslint-plugin-react/lib/rules/sort-prop-types' { 250 | declare module.exports: any; 251 | } 252 | 253 | declare module 'eslint-plugin-react/lib/rules/style-prop-object' { 254 | declare module.exports: any; 255 | } 256 | 257 | declare module 'eslint-plugin-react/lib/rules/void-dom-elements-no-children' { 258 | declare module.exports: any; 259 | } 260 | 261 | declare module 'eslint-plugin-react/lib/util/annotations' { 262 | declare module.exports: any; 263 | } 264 | 265 | declare module 'eslint-plugin-react/lib/util/Components' { 266 | declare module.exports: any; 267 | } 268 | 269 | declare module 'eslint-plugin-react/lib/util/getTokenBeforeClosingBracket' { 270 | declare module.exports: any; 271 | } 272 | 273 | declare module 'eslint-plugin-react/lib/util/makeNoMethodSetStateRule' { 274 | declare module.exports: any; 275 | } 276 | 277 | declare module 'eslint-plugin-react/lib/util/pragma' { 278 | declare module.exports: any; 279 | } 280 | 281 | declare module 'eslint-plugin-react/lib/util/variable' { 282 | declare module.exports: any; 283 | } 284 | 285 | declare module 'eslint-plugin-react/lib/util/version' { 286 | declare module.exports: any; 287 | } 288 | 289 | // Filename aliases 290 | declare module 'eslint-plugin-react/index' { 291 | declare module.exports: $Exports<'eslint-plugin-react'>; 292 | } 293 | declare module 'eslint-plugin-react/index.js' { 294 | declare module.exports: $Exports<'eslint-plugin-react'>; 295 | } 296 | declare module 'eslint-plugin-react/lib/rules/display-name.js' { 297 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/display-name'>; 298 | } 299 | declare module 'eslint-plugin-react/lib/rules/forbid-component-props.js' { 300 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/forbid-component-props'>; 301 | } 302 | declare module 'eslint-plugin-react/lib/rules/forbid-elements.js' { 303 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/forbid-elements'>; 304 | } 305 | declare module 'eslint-plugin-react/lib/rules/forbid-foreign-prop-types.js' { 306 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/forbid-foreign-prop-types'>; 307 | } 308 | declare module 'eslint-plugin-react/lib/rules/forbid-prop-types.js' { 309 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/forbid-prop-types'>; 310 | } 311 | declare module 'eslint-plugin-react/lib/rules/jsx-boolean-value.js' { 312 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-boolean-value'>; 313 | } 314 | declare module 'eslint-plugin-react/lib/rules/jsx-closing-bracket-location.js' { 315 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-closing-bracket-location'>; 316 | } 317 | declare module 'eslint-plugin-react/lib/rules/jsx-curly-spacing.js' { 318 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-curly-spacing'>; 319 | } 320 | declare module 'eslint-plugin-react/lib/rules/jsx-equals-spacing.js' { 321 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-equals-spacing'>; 322 | } 323 | declare module 'eslint-plugin-react/lib/rules/jsx-filename-extension.js' { 324 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-filename-extension'>; 325 | } 326 | declare module 'eslint-plugin-react/lib/rules/jsx-first-prop-new-line.js' { 327 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-first-prop-new-line'>; 328 | } 329 | declare module 'eslint-plugin-react/lib/rules/jsx-handler-names.js' { 330 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-handler-names'>; 331 | } 332 | declare module 'eslint-plugin-react/lib/rules/jsx-indent-props.js' { 333 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-indent-props'>; 334 | } 335 | declare module 'eslint-plugin-react/lib/rules/jsx-indent.js' { 336 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-indent'>; 337 | } 338 | declare module 'eslint-plugin-react/lib/rules/jsx-key.js' { 339 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-key'>; 340 | } 341 | declare module 'eslint-plugin-react/lib/rules/jsx-max-props-per-line.js' { 342 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-max-props-per-line'>; 343 | } 344 | declare module 'eslint-plugin-react/lib/rules/jsx-no-bind.js' { 345 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-no-bind'>; 346 | } 347 | declare module 'eslint-plugin-react/lib/rules/jsx-no-comment-textnodes.js' { 348 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-no-comment-textnodes'>; 349 | } 350 | declare module 'eslint-plugin-react/lib/rules/jsx-no-duplicate-props.js' { 351 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-no-duplicate-props'>; 352 | } 353 | declare module 'eslint-plugin-react/lib/rules/jsx-no-literals.js' { 354 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-no-literals'>; 355 | } 356 | declare module 'eslint-plugin-react/lib/rules/jsx-no-target-blank.js' { 357 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-no-target-blank'>; 358 | } 359 | declare module 'eslint-plugin-react/lib/rules/jsx-no-undef.js' { 360 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-no-undef'>; 361 | } 362 | declare module 'eslint-plugin-react/lib/rules/jsx-pascal-case.js' { 363 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-pascal-case'>; 364 | } 365 | declare module 'eslint-plugin-react/lib/rules/jsx-sort-props.js' { 366 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-sort-props'>; 367 | } 368 | declare module 'eslint-plugin-react/lib/rules/jsx-space-before-closing.js' { 369 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-space-before-closing'>; 370 | } 371 | declare module 'eslint-plugin-react/lib/rules/jsx-tag-spacing.js' { 372 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-tag-spacing'>; 373 | } 374 | declare module 'eslint-plugin-react/lib/rules/jsx-uses-react.js' { 375 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-uses-react'>; 376 | } 377 | declare module 'eslint-plugin-react/lib/rules/jsx-uses-vars.js' { 378 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-uses-vars'>; 379 | } 380 | declare module 'eslint-plugin-react/lib/rules/jsx-wrap-multilines.js' { 381 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/jsx-wrap-multilines'>; 382 | } 383 | declare module 'eslint-plugin-react/lib/rules/no-array-index-key.js' { 384 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-array-index-key'>; 385 | } 386 | declare module 'eslint-plugin-react/lib/rules/no-children-prop.js' { 387 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-children-prop'>; 388 | } 389 | declare module 'eslint-plugin-react/lib/rules/no-danger-with-children.js' { 390 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-danger-with-children'>; 391 | } 392 | declare module 'eslint-plugin-react/lib/rules/no-danger.js' { 393 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-danger'>; 394 | } 395 | declare module 'eslint-plugin-react/lib/rules/no-deprecated.js' { 396 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-deprecated'>; 397 | } 398 | declare module 'eslint-plugin-react/lib/rules/no-did-mount-set-state.js' { 399 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-did-mount-set-state'>; 400 | } 401 | declare module 'eslint-plugin-react/lib/rules/no-did-update-set-state.js' { 402 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-did-update-set-state'>; 403 | } 404 | declare module 'eslint-plugin-react/lib/rules/no-direct-mutation-state.js' { 405 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-direct-mutation-state'>; 406 | } 407 | declare module 'eslint-plugin-react/lib/rules/no-find-dom-node.js' { 408 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-find-dom-node'>; 409 | } 410 | declare module 'eslint-plugin-react/lib/rules/no-is-mounted.js' { 411 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-is-mounted'>; 412 | } 413 | declare module 'eslint-plugin-react/lib/rules/no-multi-comp.js' { 414 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-multi-comp'>; 415 | } 416 | declare module 'eslint-plugin-react/lib/rules/no-render-return-value.js' { 417 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-render-return-value'>; 418 | } 419 | declare module 'eslint-plugin-react/lib/rules/no-set-state.js' { 420 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-set-state'>; 421 | } 422 | declare module 'eslint-plugin-react/lib/rules/no-string-refs.js' { 423 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-string-refs'>; 424 | } 425 | declare module 'eslint-plugin-react/lib/rules/no-unescaped-entities.js' { 426 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-unescaped-entities'>; 427 | } 428 | declare module 'eslint-plugin-react/lib/rules/no-unknown-property.js' { 429 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-unknown-property'>; 430 | } 431 | declare module 'eslint-plugin-react/lib/rules/no-unused-prop-types.js' { 432 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-unused-prop-types'>; 433 | } 434 | declare module 'eslint-plugin-react/lib/rules/no-will-update-set-state.js' { 435 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/no-will-update-set-state'>; 436 | } 437 | declare module 'eslint-plugin-react/lib/rules/prefer-es6-class.js' { 438 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/prefer-es6-class'>; 439 | } 440 | declare module 'eslint-plugin-react/lib/rules/prefer-stateless-function.js' { 441 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/prefer-stateless-function'>; 442 | } 443 | declare module 'eslint-plugin-react/lib/rules/prop-types.js' { 444 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/prop-types'>; 445 | } 446 | declare module 'eslint-plugin-react/lib/rules/react-in-jsx-scope.js' { 447 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/react-in-jsx-scope'>; 448 | } 449 | declare module 'eslint-plugin-react/lib/rules/require-default-props.js' { 450 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/require-default-props'>; 451 | } 452 | declare module 'eslint-plugin-react/lib/rules/require-optimization.js' { 453 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/require-optimization'>; 454 | } 455 | declare module 'eslint-plugin-react/lib/rules/require-render-return.js' { 456 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/require-render-return'>; 457 | } 458 | declare module 'eslint-plugin-react/lib/rules/self-closing-comp.js' { 459 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/self-closing-comp'>; 460 | } 461 | declare module 'eslint-plugin-react/lib/rules/sort-comp.js' { 462 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/sort-comp'>; 463 | } 464 | declare module 'eslint-plugin-react/lib/rules/sort-prop-types.js' { 465 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/sort-prop-types'>; 466 | } 467 | declare module 'eslint-plugin-react/lib/rules/style-prop-object.js' { 468 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/style-prop-object'>; 469 | } 470 | declare module 'eslint-plugin-react/lib/rules/void-dom-elements-no-children.js' { 471 | declare module.exports: $Exports<'eslint-plugin-react/lib/rules/void-dom-elements-no-children'>; 472 | } 473 | declare module 'eslint-plugin-react/lib/util/annotations.js' { 474 | declare module.exports: $Exports<'eslint-plugin-react/lib/util/annotations'>; 475 | } 476 | declare module 'eslint-plugin-react/lib/util/Components.js' { 477 | declare module.exports: $Exports<'eslint-plugin-react/lib/util/Components'>; 478 | } 479 | declare module 'eslint-plugin-react/lib/util/getTokenBeforeClosingBracket.js' { 480 | declare module.exports: $Exports<'eslint-plugin-react/lib/util/getTokenBeforeClosingBracket'>; 481 | } 482 | declare module 'eslint-plugin-react/lib/util/makeNoMethodSetStateRule.js' { 483 | declare module.exports: $Exports<'eslint-plugin-react/lib/util/makeNoMethodSetStateRule'>; 484 | } 485 | declare module 'eslint-plugin-react/lib/util/pragma.js' { 486 | declare module.exports: $Exports<'eslint-plugin-react/lib/util/pragma'>; 487 | } 488 | declare module 'eslint-plugin-react/lib/util/variable.js' { 489 | declare module.exports: $Exports<'eslint-plugin-react/lib/util/variable'>; 490 | } 491 | declare module 'eslint-plugin-react/lib/util/version.js' { 492 | declare module.exports: $Exports<'eslint-plugin-react/lib/util/version'>; 493 | } 494 | -------------------------------------------------------------------------------- /flow-typed/npm/lodash_v4.x.x.js: -------------------------------------------------------------------------------- 1 | // flow-typed signature: 04bf8715953ef97bd686bf49ded90cc8 2 | // flow-typed version: 69a0c85473/lodash_v4.x.x/flow_>=v0.47.x 3 | 4 | declare module 'lodash' { 5 | declare type TemplateSettings = { 6 | escape?: RegExp, 7 | evaluate?: RegExp, 8 | imports?: Object, 9 | interpolate?: RegExp, 10 | variable?: string, 11 | }; 12 | 13 | declare type TruncateOptions = { 14 | length?: number, 15 | omission?: string, 16 | separator?: RegExp|string, 17 | }; 18 | 19 | declare type DebounceOptions = { 20 | leading?: bool, 21 | maxWait?: number, 22 | trailing?: bool, 23 | }; 24 | 25 | declare type ThrottleOptions = { 26 | leading?: bool, 27 | trailing?: bool, 28 | }; 29 | 30 | declare type NestedArray = Array>; 31 | 32 | declare type matchesIterateeShorthand = Object; 33 | declare type matchesPropertyIterateeShorthand = [string, any]; 34 | declare type propertyIterateeShorthand = string; 35 | 36 | declare type OPredicate = 37 | | ((value: A, key: string, object: O) => any) 38 | | matchesIterateeShorthand 39 | | matchesPropertyIterateeShorthand 40 | | propertyIterateeShorthand; 41 | 42 | declare type OIterateeWithResult = Object|string|((value: V, key: string, object: O) => R); 43 | declare type OIteratee = OIterateeWithResult; 44 | declare type OFlatMapIteratee = OIterateeWithResult>; 45 | 46 | declare type Predicate = 47 | | ((value: T, index: number, array: Array) => any) 48 | | matchesIterateeShorthand 49 | | matchesPropertyIterateeShorthand 50 | | propertyIterateeShorthand; 51 | 52 | declare type _ValueOnlyIteratee = (value: T) => mixed; 53 | declare type ValueOnlyIteratee = _ValueOnlyIteratee|string; 54 | declare type _Iteratee = (item: T, index: number, array: ?Array) => mixed; 55 | declare type Iteratee = _Iteratee|Object|string; 56 | declare type FlatMapIteratee = ((item: T, index: number, array: ?Array) => Array)|Object|string; 57 | declare type Comparator = (item: T, item2: T) => bool; 58 | 59 | declare type MapIterator = 60 | | ((item: T, index: number, array: Array) => U) 61 | | propertyIterateeShorthand; 62 | 63 | declare type OMapIterator = 64 | | ((item: T, key: string, object: O) => U) 65 | | propertyIterateeShorthand; 66 | 67 | declare class Lodash { 68 | // Array 69 | chunk(array: ?Array, size?: number): Array>; 70 | compact(array: Array): Array; 71 | concat(base: Array, ...elements: Array): Array; 72 | difference(array: ?Array, values?: Array): Array; 73 | differenceBy(array: ?Array, values: Array, iteratee: ValueOnlyIteratee): T[]; 74 | differenceWith(array: T[], values: T[], comparator?: Comparator): T[]; 75 | drop(array: ?Array, n?: number): Array; 76 | dropRight(array: ?Array, n?: number): Array; 77 | dropRightWhile(array: ?Array, predicate?: Predicate): Array; 78 | dropWhile(array: ?Array, predicate?: Predicate): Array; 79 | fill(array: ?Array, value: U, start?: number, end?: number): Array; 80 | findIndex(array: ?Array, predicate?: Predicate): number; 81 | findLastIndex(array: ?Array, predicate?: Predicate): number; 82 | // alias of _.head 83 | first(array: ?Array): T; 84 | flatten(array: Array|X>): Array; 85 | flattenDeep(array: any[]): Array; 86 | flattenDepth(array: any[], depth?: number): any[]; 87 | fromPairs(pairs: Array): Object; 88 | head(array: ?Array): T; 89 | indexOf(array: ?Array, value: T, fromIndex?: number): number; 90 | initial(array: ?Array): Array; 91 | intersection(...arrays: Array>): Array; 92 | //Workaround until (...parameter: T, parameter2: U) works 93 | intersectionBy(a1: Array, iteratee?: ValueOnlyIteratee): Array; 94 | intersectionBy(a1: Array, a2: Array, iteratee?: ValueOnlyIteratee): Array; 95 | intersectionBy(a1: Array, a2: Array, a3: Array, iteratee?: ValueOnlyIteratee): Array; 96 | intersectionBy(a1: Array, a2: Array, a3: Array, a4: Array, iteratee?: ValueOnlyIteratee): Array; 97 | //Workaround until (...parameter: T, parameter2: U) works 98 | intersectionWith(a1: Array, comparator: Comparator): Array; 99 | intersectionWith(a1: Array, a2: Array, comparator: Comparator): Array; 100 | intersectionWith(a1: Array, a2: Array, a3: Array, comparator: Comparator): Array; 101 | intersectionWith(a1: Array, a2: Array, a3: Array, a4: Array, comparator: Comparator): Array; 102 | join(array: ?Array, separator?: string): string; 103 | last(array: ?Array): T; 104 | lastIndexOf(array: ?Array, value: T, fromIndex?: number): number; 105 | nth(array: T[], n?: number): T; 106 | pull(array: ?Array, ...values?: Array): Array; 107 | pullAll(array: ?Array, values: Array): Array; 108 | pullAllBy(array: ?Array, values: Array, iteratee?: ValueOnlyIteratee): Array; 109 | pullAllWith(array?: T[], values: T[], comparator?: Function): T[]; 110 | pullAt(array: ?Array, ...indexed?: Array): Array; 111 | pullAt(array: ?Array, indexed?: Array): Array; 112 | remove(array: ?Array, predicate?: Predicate): Array; 113 | reverse(array: ?Array): Array; 114 | slice(array: ?Array, start?: number, end?: number): Array; 115 | sortedIndex(array: ?Array, value: T): number; 116 | sortedIndexBy(array: ?Array, value: T, iteratee?: ValueOnlyIteratee): number; 117 | sortedIndexOf(array: ?Array, value: T): number; 118 | sortedLastIndex(array: ?Array, value: T): number; 119 | sortedLastIndexBy(array: ?Array, value: T, iteratee?: ValueOnlyIteratee): number; 120 | sortedLastIndexOf(array: ?Array, value: T): number; 121 | sortedUniq(array: ?Array): Array; 122 | sortedUniqBy(array: ?Array, iteratee?: (value: T) => mixed): Array; 123 | tail(array: ?Array): Array; 124 | take(array: ?Array, n?: number): Array; 125 | takeRight(array: ?Array, n?: number): Array; 126 | takeRightWhile(array: ?Array, predicate?: Predicate): Array; 127 | takeWhile(array: ?Array, predicate?: Predicate): Array; 128 | union(...arrays?: Array>): Array; 129 | //Workaround until (...parameter: T, parameter2: U) works 130 | unionBy(a1: Array, iteratee?: ValueOnlyIteratee): Array; 131 | unionBy(a1: Array, a2: Array, iteratee?: ValueOnlyIteratee): Array; 132 | unionBy(a1: Array, a2: Array, a3: Array, iteratee?: ValueOnlyIteratee): Array; 133 | unionBy(a1: Array, a2: Array, a3: Array, a4: Array, iteratee?: ValueOnlyIteratee): Array; 134 | //Workaround until (...parameter: T, parameter2: U) works 135 | unionWith(a1: Array, comparator?: Comparator): Array; 136 | unionWith(a1: Array, a2: Array, comparator?: Comparator): Array; 137 | unionWith(a1: Array, a2: Array, a3: Array, comparator?: Comparator): Array; 138 | unionWith(a1: Array, a2: Array, a3: Array, a4: Array, comparator?: Comparator): Array; 139 | uniq(array: ?Array): Array; 140 | uniqBy(array: ?Array, iteratee?: ValueOnlyIteratee): Array; 141 | uniqWith(array: ?Array, comparator?: Comparator): Array; 142 | unzip(array: ?Array): Array; 143 | unzipWith(array: ?Array, iteratee?: Iteratee): Array; 144 | without(array: ?Array, ...values?: Array): Array; 145 | xor(...array: Array>): Array; 146 | //Workaround until (...parameter: T, parameter2: U) works 147 | xorBy(a1: Array, iteratee?: ValueOnlyIteratee): Array; 148 | xorBy(a1: Array, a2: Array, iteratee?: ValueOnlyIteratee): Array; 149 | xorBy(a1: Array, a2: Array, a3: Array, iteratee?: ValueOnlyIteratee): Array; 150 | xorBy(a1: Array, a2: Array, a3: Array, a4: Array, iteratee?: ValueOnlyIteratee): Array; 151 | //Workaround until (...parameter: T, parameter2: U) works 152 | xorWith(a1: Array, comparator?: Comparator): Array; 153 | xorWith(a1: Array, a2: Array, comparator?: Comparator): Array; 154 | xorWith(a1: Array, a2: Array, a3: Array, comparator?: Comparator): Array; 155 | xorWith(a1: Array, a2: Array, a3: Array, a4: Array, comparator?: Comparator): Array; 156 | zip(a1: A[], a2: B[]): Array<[A, B]>; 157 | zip(a1: A[], a2: B[], a3: C[]): Array<[A, B, C]>; 158 | zip(a1: A[], a2: B[], a3: C[], a4: D[]): Array<[A, B, C, D]>; 159 | zip(a1: A[], a2: B[], a3: C[], a4: D[], a5: E[]): Array<[A, B, C, D, E]>; 160 | 161 | zipObject(props?: Array, values?: Array): Object; 162 | zipObjectDeep(props?: any[], values?: any): Object; 163 | //Workaround until (...parameter: T, parameter2: U) works 164 | zipWith(a1: NestedArray, iteratee?: Iteratee): Array; 165 | zipWith(a1: NestedArray, a2: NestedArray, iteratee?: Iteratee): Array; 166 | zipWith(a1: NestedArray, a2: NestedArray, a3: NestedArray, iteratee?: Iteratee): Array; 167 | zipWith(a1: NestedArray, a2: NestedArray, a3: NestedArray, a4: NestedArray, iteratee?: Iteratee): Array; 168 | 169 | // Collection 170 | countBy(array: ?Array, iteratee?: ValueOnlyIteratee): Object; 171 | countBy(object: T, iteratee?: ValueOnlyIteratee): Object; 172 | // alias of _.forEach 173 | each(array: ?Array, iteratee?: Iteratee): Array; 174 | each(object: T, iteratee?: OIteratee): T; 175 | // alias of _.forEachRight 176 | eachRight(array: ?Array, iteratee?: Iteratee): Array; 177 | eachRight(object: T, iteratee?: OIteratee): T; 178 | every(array: ?Array, iteratee?: Iteratee): bool; 179 | every(object: T, iteratee?: OIteratee): bool; 180 | filter(array: ?Array, predicate?: Predicate): Array; 181 | filter(object: T, predicate?: OPredicate): Array; 182 | find(array: ?Array, predicate?: Predicate): T|void; 183 | find(object: T, predicate?: OPredicate): V; 184 | findLast(array: ?Array, predicate?: Predicate): T|void; 185 | findLast(object: T, predicate?: OPredicate): V; 186 | flatMap(array: ?Array, iteratee?: FlatMapIteratee): Array; 187 | flatMap(object: T, iteratee?: OFlatMapIteratee): Array; 188 | flatMapDeep(array: ?Array, iteratee?: FlatMapIteratee): Array; 189 | flatMapDeep(object: T, iteratee?: OFlatMapIteratee): Array; 190 | flatMapDepth(array: ?Array, iteratee?: FlatMapIteratee, depth?: number): Array; 191 | flatMapDepth(object: T, iteratee?: OFlatMapIteratee, depth?: number): Array; 192 | forEach(array: ?Array, iteratee?: Iteratee): Array; 193 | forEach(object: T, iteratee?: OIteratee): T; 194 | forEachRight(array: ?Array, iteratee?: Iteratee): Array; 195 | forEachRight(object: T, iteratee?: OIteratee): T; 196 | groupBy(array: ?Array, iteratee?: ValueOnlyIteratee): {[key: V]: ?Array}; 197 | groupBy(object: T, iteratee?: ValueOnlyIteratee): {[key: V]: ?Array}; 198 | includes(array: ?Array, value: T, fromIndex?: number): bool; 199 | includes(object: T, value: any, fromIndex?: number): bool; 200 | includes(str: string, value: string, fromIndex?: number): bool; 201 | invokeMap(array: ?Array, path: ((value: T) => Array|string)|Array|string, ...args?: Array): Array; 202 | invokeMap(object: T, path: ((value: any) => Array|string)|Array|string, ...args?: Array): Array; 203 | keyBy(array: ?Array, iteratee?: ValueOnlyIteratee): {[key: V]: ?T}; 204 | keyBy(object: T, iteratee?: ValueOnlyIteratee): {[key: V]: ?A}; 205 | map(array: ?Array, iteratee?: MapIterator): Array; 206 | map(object: ?T, iteratee?: OMapIterator): Array; 207 | map(str: ?string, iteratee?: (char: string, index: number, str: string) => any): string; 208 | orderBy(array: ?Array, iteratees?: Array>|string, orders?: Array<'asc'|'desc'>|string): Array; 209 | orderBy(object: T, iteratees?: Array>|string, orders?: Array<'asc'|'desc'>|string): Array; 210 | partition(array: ?Array, predicate?: Predicate): NestedArray; 211 | partition(object: T, predicate?: OPredicate): NestedArray; 212 | reduce(array: ?Array, iteratee?: (accumulator: U, value: T, index: number, array: ?Array) => U, accumulator?: U): U; 213 | reduce(object: T, iteratee?: (accumulator: U, value: any, key: string, object: T) => U, accumulator?: U): U; 214 | reduceRight(array: ?Array, iteratee?: (accumulator: U, value: T, index: number, array: ?Array) => U, accumulator?: U): U; 215 | reduceRight(object: T, iteratee?: (accumulator: U, value: any, key: string, object: T) => U, accumulator?: U): U; 216 | reject(array: ?Array, predicate?: Predicate): Array; 217 | reject(object: T, predicate?: OPredicate): Array; 218 | sample(array: ?Array): T; 219 | sample(object: T): V; 220 | sampleSize(array: ?Array, n?: number): Array; 221 | sampleSize(object: T, n?: number): Array; 222 | shuffle(array: ?Array): Array; 223 | shuffle(object: T): Array; 224 | size(collection: Array|Object): number; 225 | some(array: ?Array, predicate?: Predicate): bool; 226 | some(object?: ?T, predicate?: OPredicate): bool; 227 | sortBy(array: ?Array, ...iteratees?: Array>): Array; 228 | sortBy(array: ?Array, iteratees?: Array>): Array; 229 | sortBy(object: T, ...iteratees?: Array>): Array; 230 | sortBy(object: T, iteratees?: Array>): Array; 231 | 232 | // Date 233 | now(): number; 234 | 235 | // Function 236 | after(n: number, fn: Function): Function; 237 | ary(func: Function, n?: number): Function; 238 | before(n: number, fn: Function): Function; 239 | bind(func: Function, thisArg: any, ...partials: Array): Function; 240 | bindKey(obj: Object, key: string, ...partials: Array): Function; 241 | curry(func: Function, arity?: number): Function; 242 | curryRight(func: Function, arity?: number): Function; 243 | debounce(func: Function, wait?: number, options?: DebounceOptions): Function; 244 | defer(func: Function, ...args?: Array): number; 245 | delay(func: Function, wait: number, ...args?: Array): number; 246 | flip(func: Function): Function; 247 | memoize(func: Function, resolver?: Function): Function; 248 | negate(predicate: Function): Function; 249 | once(func: Function): Function; 250 | overArgs(func: Function, ...transforms: Array): Function; 251 | overArgs(func: Function, transforms: Array): Function; 252 | partial(func: Function, ...partials: any[]): Function; 253 | partialRight(func: Function, ...partials: Array): Function; 254 | partialRight(func: Function, partials: Array): Function; 255 | rearg(func: Function, ...indexes: Array): Function; 256 | rearg(func: Function, indexes: Array): Function; 257 | rest(func: Function, start?: number): Function; 258 | spread(func: Function): Function; 259 | throttle(func: Function, wait?: number, options?: ThrottleOptions): Function; 260 | unary(func: Function): Function; 261 | wrap(value: any, wrapper: Function): Function; 262 | 263 | // Lang 264 | castArray(value: *): any[]; 265 | clone(value: T): T; 266 | cloneDeep(value: T): T; 267 | cloneDeepWith(value: T, customizer?: ?(value: T, key: number|string, object: T, stack: any) => U): U; 268 | cloneWith(value: T, customizer?: ?(value: T, key: number|string, object: T, stack: any) => U): U; 269 | conformsTo(source: T, predicates: T&{[key:string]:(x:any)=>boolean}): boolean; 270 | eq(value: any, other: any): bool; 271 | gt(value: any, other: any): bool; 272 | gte(value: any, other: any): bool; 273 | isArguments(value: any): bool; 274 | isArray(value: any): bool; 275 | isArrayBuffer(value: any): bool; 276 | isArrayLike(value: any): bool; 277 | isArrayLikeObject(value: any): bool; 278 | isBoolean(value: any): bool; 279 | isBuffer(value: any): bool; 280 | isDate(value: any): bool; 281 | isElement(value: any): bool; 282 | isEmpty(value: any): bool; 283 | isEqual(value: any, other: any): bool; 284 | isEqualWith(value: T, other: U, customizer?: (objValue: any, otherValue: any, key: number|string, object: T, other: U, stack: any) => bool|void): bool; 285 | isError(value: any): bool; 286 | isFinite(value: any): bool; 287 | isFunction(value: Function): true; 288 | isFunction(value: number|string|void|null|Object): false; 289 | isInteger(value: any): bool; 290 | isLength(value: any): bool; 291 | isMap(value: any): bool; 292 | isMatch(object?: ?Object, source: Object): bool; 293 | isMatchWith(object: T, source: U, customizer?: (objValue: any, srcValue: any, key: number|string, object: T, source: U) => bool|void): bool; 294 | isNaN(value: any): bool; 295 | isNative(value: any): bool; 296 | isNil(value: any): bool; 297 | isNull(value: any): bool; 298 | isNumber(value: any): bool; 299 | isObject(value: any): bool; 300 | isObjectLike(value: any): bool; 301 | isPlainObject(value: any): bool; 302 | isRegExp(value: any): bool; 303 | isSafeInteger(value: any): bool; 304 | isSet(value: any): bool; 305 | isString(value: string): true; 306 | isString(value: number|Function|void|null|Object|Array): false; 307 | isSymbol(value: any): bool; 308 | isTypedArray(value: any): bool; 309 | isUndefined(value: any): bool; 310 | isWeakMap(value: any): bool; 311 | isWeakSet(value: any): bool; 312 | lt(value: any, other: any): bool; 313 | lte(value: any, other: any): bool; 314 | toArray(value: any): Array; 315 | toFinite(value: any): number; 316 | toInteger(value: any): number; 317 | toLength(value: any): number; 318 | toNumber(value: any): number; 319 | toPlainObject(value: any): Object; 320 | toSafeInteger(value: any): number; 321 | toString(value: any): string; 322 | 323 | // Math 324 | add(augend: number, addend: number): number; 325 | ceil(number: number, precision?: number): number; 326 | divide(dividend: number, divisor: number): number; 327 | floor(number: number, precision?: number): number; 328 | max(array: ?Array): T; 329 | maxBy(array: ?Array, iteratee?: Iteratee): T; 330 | mean(array: Array<*>): number; 331 | meanBy(array: Array, iteratee?: Iteratee): number; 332 | min(array: ?Array): T; 333 | minBy(array: ?Array, iteratee?: Iteratee): T; 334 | multiply(multiplier: number, multiplicand: number): number; 335 | round(number: number, precision?: number): number; 336 | subtract(minuend: number, subtrahend: number): number; 337 | sum(array: Array<*>): number; 338 | sumBy(array: Array, iteratee?: Iteratee): number; 339 | 340 | // number 341 | clamp(number: number, lower?: number, upper: number): number; 342 | inRange(number: number, start?: number, end: number): bool; 343 | random(lower?: number, upper?: number, floating?: bool): number; 344 | 345 | // Object 346 | assign(object?: ?Object, ...sources?: Array): Object; 347 | assignIn(a: A, b: B): A & B; 348 | assignIn(a: A, b: B, c: C): A & B & C; 349 | assignIn(a: A, b: B, c: C, d: D): A & B & C & D; 350 | assignIn(a: A, b: B, c: C, d: D, e: E): A & B & C & D & E; 351 | assignInWith(object: T, s1: A, customizer?: (objValue: any, srcValue: any, key: string, object: T, source: A) => any|void): Object; 352 | assignInWith(object: T, s1: A, s2: B, customizer?: (objValue: any, srcValue: any, key: string, object: T, source: A|B) => any|void): Object; 353 | 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; 354 | 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; 355 | assignWith(object: T, s1: A, customizer?: (objValue: any, srcValue: any, key: string, object: T, source: A) => any|void): Object; 356 | assignWith(object: T, s1: A, s2: B, customizer?: (objValue: any, srcValue: any, key: string, object: T, source: A|B) => any|void): Object; 357 | 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; 358 | 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; 359 | at(object?: ?Object, ...paths: Array): Array; 360 | at(object?: ?Object, paths: Array): Array; 361 | create(prototype: T, properties?: Object): $Supertype; 362 | defaults(object?: ?Object, ...sources?: Array): Object; 363 | defaultsDeep(object?: ?Object, ...sources?: Array): Object; 364 | // alias for _.toPairs 365 | entries(object?: ?Object): NestedArray; 366 | // alias for _.toPairsIn 367 | entriesIn(object?: ?Object): NestedArray; 368 | // alias for _.assignIn 369 | extend(a: A, b: B): A & B; 370 | extend(a: A, b: B, c: C): A & B & C; 371 | extend(a: A, b: B, c: C, d: D): A & B & C & D; 372 | extend(a: A, b: B, c: C, d: D, e: E): A & B & C & D & E; 373 | // alias for _.assignInWith 374 | extendWith(object: T, s1: A, customizer?: (objValue: any, srcValue: any, key: string, object: T, source: A) => any|void): Object; 375 | extendWith(object: T, s1: A, s2: B, customizer?: (objValue: any, srcValue: any, key: string, object: T, source: A|B) => any|void): Object; 376 | 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; 377 | 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; 378 | findKey(object?: ?T, predicate?: OPredicate): string|void; 379 | findLastKey(object?: ?T, predicate?: OPredicate): string|void; 380 | forIn(object?: ?Object, iteratee?: OIteratee<*>): Object; 381 | forInRight(object?: ?Object, iteratee?: OIteratee<*>): Object; 382 | forOwn(object?: ?Object, iteratee?: OIteratee<*>): Object; 383 | forOwnRight(object?: ?Object, iteratee?: OIteratee<*>): Object; 384 | functions(object?: ?Object): Array; 385 | functionsIn(object?: ?Object): Array; 386 | get(object?: ?Object|?Array, path?: ?Array|string, defaultValue?: any): any; 387 | has(object?: ?Object, path?: ?Array|string): bool; 388 | hasIn(object?: ?Object, path?: ?Array|string): bool; 389 | invert(object?: ?Object, multiVal?: bool): Object; 390 | invertBy(object: ?Object, iteratee?: Function): Object; 391 | invoke(object?: ?Object, path?: ?Array|string, ...args?: Array): any; 392 | keys(object?: ?Object): Array; 393 | keysIn(object?: ?Object): Array; 394 | mapKeys(object?: ?Object, iteratee?: OIteratee<*>): Object; 395 | mapValues(object?: ?Object, iteratee?: OIteratee<*>): Object; 396 | merge(object?: ?Object, ...sources?: Array): Object; 397 | mergeWith(object: T, customizer?: (objValue: any, srcValue: any, key: string, object: T, source: A) => any|void): Object; 398 | mergeWith(object: T, s1: A, s2: B, customizer?: (objValue: any, srcValue: any, key: string, object: T, source: A|B) => any|void): Object; 399 | 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; 400 | 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; 401 | omit(object?: ?Object, ...props: Array): Object; 402 | omit(object?: ?Object, props: Array): Object; 403 | omitBy(object?: ?T, predicate?: OPredicate): Object; 404 | pick(object?: ?Object, ...props: Array): Object; 405 | pick(object?: ?Object, props: Array): Object; 406 | pickBy(object?: ?T, predicate?: OPredicate): Object; 407 | result(object?: ?Object, path?: ?Array|string, defaultValue?: any): any; 408 | set(object?: ?Object, path?: ?Array|string, value: any): Object; 409 | setWith(object: T, path?: ?Array|string, value: any, customizer?: (nsValue: any, key: string, nsObject: T) => any): Object; 410 | toPairs(object?: ?Object|Array<*>): NestedArray; 411 | toPairsIn(object?: ?Object): NestedArray; 412 | transform(collection: Object|Array, iteratee?: OIteratee<*>, accumulator?: any): any; 413 | unset(object?: ?Object, path?: ?Array|string): bool; 414 | update(object: Object, path: string[]|string, updater: Function): Object; 415 | updateWith(object: Object, path: string[]|string, updater: Function, customizer?: Function): Object; 416 | values(object?: ?Object): Array; 417 | valuesIn(object?: ?Object): Array; 418 | 419 | // Seq 420 | // harder to read, but this is _() 421 | (value: any): any; 422 | chain(value: T): any; 423 | tap(value: T, interceptor: (value:T)=>any): T; 424 | thru(value: T1, interceptor: (value:T1)=>T2): T2; 425 | // TODO: _.prototype.* 426 | 427 | // String 428 | camelCase(string?: ?string): string; 429 | capitalize(string?: string): string; 430 | deburr(string?: string): string; 431 | endsWith(string?: string, target?: string, position?: number): bool; 432 | escape(string?: string): string; 433 | escapeRegExp(string?: string): string; 434 | kebabCase(string?: string): string; 435 | lowerCase(string?: string): string; 436 | lowerFirst(string?: string): string; 437 | pad(string?: string, length?: number, chars?: string): string; 438 | padEnd(string?: string, length?: number, chars?: string): string; 439 | padStart(string?: string, length?: number, chars?: string): string; 440 | parseInt(string: string, radix?: number): number; 441 | repeat(string?: string, n?: number): string; 442 | replace(string?: string, pattern: RegExp|string, replacement: ((string: string) => string)|string): string; 443 | snakeCase(string?: string): string; 444 | split(string?: string, separator: RegExp|string, limit?: number): Array; 445 | startCase(string?: string): string; 446 | startsWith(string?: string, target?: string, position?: number): bool; 447 | template(string?: string, options?: TemplateSettings): Function; 448 | toLower(string?: string): string; 449 | toUpper(string?: string): string; 450 | trim(string?: string, chars?: string): string; 451 | trimEnd(string?: string, chars?: string): string; 452 | trimStart(string?: string, chars?: string): string; 453 | truncate(string?: string, options?: TruncateOptions): string; 454 | unescape(string?: string): string; 455 | upperCase(string?: string): string; 456 | upperFirst(string?: string): string; 457 | words(string?: string, pattern?: RegExp|string): Array; 458 | 459 | // Util 460 | attempt(func: Function): any; 461 | bindAll(object?: ?Object, methodNames: Array): Object; 462 | bindAll(object?: ?Object, ...methodNames: Array): Object; 463 | cond(pairs: NestedArray): Function; 464 | conforms(source: Object): Function; 465 | constant(value: T): () => T; 466 | defaultTo(value: T1, default: T2): T1; 467 | // NaN is a number instead of its own type, otherwise it would behave like null/void 468 | defaultTo(value: T1, default: T2): T1|T2; 469 | defaultTo(value: T1, default: T2): T2; 470 | flow(...funcs?: Array): Function; 471 | flow(funcs?: Array): Function; 472 | flowRight(...funcs?: Array): Function; 473 | flowRight(funcs?: Array): Function; 474 | identity(value: T): T; 475 | iteratee(func?: any): Function; 476 | matches(source: Object): Function; 477 | matchesProperty(path?: ?Array|string, srcValue: any): Function; 478 | method(path?: ?Array|string, ...args?: Array): Function; 479 | methodOf(object?: ?Object, ...args?: Array): Function; 480 | mixin(object?: T, source: Object, options?: { chain: bool }): T; 481 | noConflict(): Lodash; 482 | noop(...args: Array): void; 483 | nthArg(n?: number): Function; 484 | over(...iteratees: Array): Function; 485 | over(iteratees: Array): Function; 486 | overEvery(...predicates: Array): Function; 487 | overEvery(predicates: Array): Function; 488 | overSome(...predicates: Array): Function; 489 | overSome(predicates: Array): Function; 490 | property(path?: ?Array|string): Function; 491 | propertyOf(object?: ?Object): Function; 492 | range(start: number, end: number, step?: number): Array; 493 | range(end: number, step?: number): Array; 494 | rangeRight(start: number, end: number, step?: number): Array; 495 | rangeRight(end: number, step?: number): Array; 496 | runInContext(context?: Object): Function; 497 | 498 | stubArray(): Array<*>; 499 | stubFalse(): false; 500 | stubObject(): {}; 501 | stubString(): ''; 502 | stubTrue(): true; 503 | times(n: number, ...rest: Array): Array; 504 | times(n: number, iteratee: ((i: number) => T)): Array; 505 | toPath(value: any): Array; 506 | uniqueId(prefix?: string): string; 507 | 508 | // Properties 509 | VERSION: string; 510 | templateSettings: TemplateSettings; 511 | } 512 | 513 | declare var exports: Lodash; 514 | } 515 | --------------------------------------------------------------------------------