Add flow-bin to dev dependencies and ignore it in flowconfig

Add flow to api/server/server.js

Add flow check to src/api: index, accountinfo, balances, orderbook..

orders, settings, transaction, transactions

Add flow typecheck to api/ledger/pathfind

Use eslint plugin flowtype to allow flow type annotations

Babel-eslint emits errors when using the type keyword. This plugin works
around the issue by stripping flow annotations before linting.

Source: https://www.npmjs.com/package/eslint-plugin-flowtype

Add flow to ledger/parse/account-order, trustline, orderbook-order
This commit is contained in:
Alan Cohen
2015-07-20 13:09:58 -07:00
parent 4bc285313c
commit b477eb238b
17 changed files with 65 additions and 19 deletions

View File

@@ -1,3 +1,5 @@
/* @flow */
'use strict';
const _ = require('lodash');
const core = require('./common').core;
@@ -28,7 +30,7 @@ const errors = require('./common').errors;
const convertExceptions = require('./common').convertExceptions;
const generateWallet = convertExceptions(core.Wallet.generate);
function RippleAPI(options) {
function RippleAPI(options: {}) {
const _options = _.assign({}, options, {automatic_resubmission: false});
this.remote = new core.Remote(_options);
}