Skip to content

Commit

Permalink
Fix type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
guigrpa committed Aug 27, 2020
1 parent 77eebb0 commit a49d635
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/timm.ts
Expand Up @@ -10,6 +10,7 @@
*/

const INVALID_ARGS = 'INVALID_ARGS';
const IS_DEV = (process as any).env.NODE_ENV !== 'production';

type Key = string | number;

Expand Down Expand Up @@ -245,7 +246,7 @@ export function getIn(obj: object, path: Key[]): unknown;
export function getIn(obj: any, path: Key[]): unknown {
if (!Array.isArray(path)) {
throwStr(
process.env.NODE_ENV !== 'production'
IS_DEV
? 'A path array should be provided when calling getIn()'
: INVALID_ARGS
);
Expand Down Expand Up @@ -695,7 +696,7 @@ function doMerge(
let out: any = first;
if (!(out != null)) {
throwStr(
process.env.NODE_ENV !== 'production'
IS_DEV
? 'At least one object should be provided to merge()'
: INVALID_ARGS
);
Expand Down

0 comments on commit a49d635

Please sign in to comment.