Skip to content

Commit

Permalink
chore: getMaxWorkers types (#8434)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshRosenstein authored and SimenB committed May 7, 2019
1 parent b3f54e7 commit 985d26c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/jest-config/src/getMaxWorkers.ts
Expand Up @@ -15,7 +15,7 @@ export default function getMaxWorkers(
return 1;
} else if (argv.maxWorkers) {
// TODO: How to type this properly? Should probably use `coerce` from `yargs`
const maxWorkers = (argv.maxWorkers as unknown) as number | string;
const maxWorkers = argv.maxWorkers;
const parsed = parseInt(maxWorkers as string, 10);

if (
Expand Down
2 changes: 1 addition & 1 deletion packages/jest-types/src/Config.ts
Expand Up @@ -452,7 +452,7 @@ export type Argv = Arguments<
json: boolean;
lastCommit: boolean;
logHeapUsage: boolean;
maxWorkers: number;
maxWorkers: number | string;
moduleDirectories: Array<string>;
moduleFileExtensions: Array<string>;
moduleNameMapper: string;
Expand Down

0 comments on commit 985d26c

Please sign in to comment.