diff --git a/package.json b/package.json index fd610922f..51b9e11df 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ "eslint": "^4.16.0", "eslint-config-prettier": "^2.9.0", "eslint-plugin-flowtype": "^2.41.0", - "flow-bin": "^0.69.0", + "flow-bin": "^0.71.0", "fs-extra": "^5.0.0", "husky": "^0.14.3", "jest": "^22.1.4", diff --git a/src/commands/shared_options.js b/src/commands/shared_options.js index 39cc9039d..c835e28a6 100644 --- a/src/commands/shared_options.js +++ b/src/commands/shared_options.js @@ -34,13 +34,13 @@ module.exports.sharedInputOptions = { "additional extensions to include in require() and import's search algorithm." + 'For instance, adding .es5 would allow require("adder") to find "adder.es5"', // Ensure that the value is an array - coerce: (value: string | Array) => [].concat(value), + coerce: (value: string | Array): Array => [].concat(value), alias: 're' }, 'parse-extension': { describe: 'additional extensions to parse as source code.', // Ensure that the value is an array - coerce: (value: string | Array) => [].concat(value), + coerce: (value: string | Array): Array => [].concat(value), alias: 'pe' }, private: { diff --git a/src/output/util/format_type.js b/src/output/util/format_type.js index 1be977525..91ef57bd1 100644 --- a/src/output/util/format_type.js +++ b/src/output/util/format_type.js @@ -81,7 +81,7 @@ function commaList(getHref, items, start, end, sep) { * @param {boolean} prefix string to put after the type comment * @returns {Array} suffixed and potentially prefixed type */ -function decorate(formatted, str, prefix) { +function decorate(formatted, str, prefix): Array { if (prefix) { return [t(str)].concat(formatted); } @@ -100,7 +100,7 @@ function decorate(formatted, str, prefix) { * formatType({ type: 'NameExpression', name: 'String' })[0].url * // => 'https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String' */ -function formatType(getHref: Function, node: ?Object) { +function formatType(getHref: Function, node: ?Object): Array { let result = []; if (!node) { diff --git a/src/sort.js b/src/sort.js index ee1344576..6b882bb94 100644 --- a/src/sort.js +++ b/src/sort.js @@ -14,7 +14,10 @@ const fs = require('fs'); * @returns {number} sorting value * @private */ -module.exports = function sortDocs(comments: Array, options: Object) { +module.exports = function sortDocs( + comments: Array, + options: Object +): Array { if (!options || !options.toc) { return sortComments(comments, options && options.sortOrder); } @@ -124,7 +127,10 @@ function compareCommentsBySourceLocation(a: Comment, b: Comment): number { return a.context.sortKey.localeCompare(b.context.sortKey); } -function sortComments(comments: Array, sortOrder: string) { +function sortComments( + comments: Array, + sortOrder: string +): Array { return comments.sort( sortOrder === 'alpha' ? compareCommentsByName diff --git a/yarn.lock b/yarn.lock index df0106547..31056e5d9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2424,9 +2424,9 @@ flat-cache@^1.2.1: graceful-fs "^4.1.2" write "^0.2.1" -flow-bin@^0.69.0: - version "0.69.0" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.69.0.tgz#053159a684a6051fcbf0b71a2eb19a9679082da6" +flow-bin@^0.71.0: + version "0.71.0" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.71.0.tgz#fd1b27a6458c3ebaa5cb811853182ed631918b70" flush-write-stream@^1.0.2: version "1.0.2"