chore: minor Flow fixes
This commit is contained in:
parent
79fb3ec8bd
commit
c8da9fec0a
@ -4,6 +4,7 @@ module.exports = {
|
||||
__DEV__: true,
|
||||
$Dict: true,
|
||||
$Diff: true,
|
||||
$ElementType: true,
|
||||
$Exact: true,
|
||||
$Keys: true,
|
||||
$PropertyType: true,
|
||||
|
@ -1,5 +1,6 @@
|
||||
// @flow
|
||||
|
||||
// $FlowFixMe
|
||||
import getStream from 'get-stream'
|
||||
import { randomBytes } from 'crypto'
|
||||
import { fromCallback, fromEvent, ignoreErrors, timeout } from 'promise-toolbox'
|
||||
|
@ -1,6 +1,5 @@
|
||||
// @flow
|
||||
|
||||
// $FlowFixMe
|
||||
import through2 from 'through2'
|
||||
import { createHash } from 'crypto'
|
||||
import { defer, fromEvent } from 'promise-toolbox'
|
||||
|
@ -1,6 +1,5 @@
|
||||
// @flow
|
||||
|
||||
// $FlowFixMe
|
||||
import through2 from 'through2'
|
||||
import { type Readable } from 'stream'
|
||||
|
||||
|
@ -147,12 +147,12 @@ const defaultSettings: Settings = {
|
||||
timeout: 0,
|
||||
vmTimeout: 0,
|
||||
}
|
||||
const getSetting = <T>(
|
||||
const getSetting = <T, K: $Keys<Settings>>(
|
||||
settings: $Dict<Settings>,
|
||||
name: $Keys<Settings>,
|
||||
name: K,
|
||||
keys: string[],
|
||||
defaultValue?: T
|
||||
): T | any => {
|
||||
): T | $ElementType<Settings, K> => {
|
||||
for (let i = 0, n = keys.length; i < n; ++i) {
|
||||
const objectSettings = settings[keys[i]]
|
||||
if (objectSettings !== undefined) {
|
||||
|
@ -5,8 +5,11 @@ import { mergeVhd as mergeVhd_ } from 'vhd-lib'
|
||||
|
||||
// Use Bluebird for all promises as it provides better performance and
|
||||
// less memory usage.
|
||||
//
|
||||
// $FlowFixMe
|
||||
global.Promise = require('bluebird')
|
||||
|
||||
// $FlowFixMe
|
||||
const config: Object = JSON.parse(process.env.XO_CONFIG)
|
||||
|
||||
export function mergeVhd (
|
||||
|
Loading…
Reference in New Issue
Block a user