Skip to content

Commit

Permalink
Suppress Flow error
Browse files Browse the repository at this point in the history
  • Loading branch information
robhogan authored Oct 31, 2024
1 parent 14d0df2 commit 0d9312b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/metro/src/lib/getMaxWorkers.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
const os = require('os');

module.exports = (workers: ?number): number => {
// $FlowFixMe[prop-missing] Missing Flow lib def for availableParallelism
const cores = os.availableParallelism();
return typeof workers === 'number' && Number.isInteger(workers)
? Math.min(cores, workers > 0 ? workers : 1)
Expand Down

0 comments on commit 0d9312b

Please sign in to comment.