Skip to content

Commit

Permalink
chore: clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
jquense committed Feb 17, 2021
1 parent 52e5876 commit 1aba3b8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/array.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export default class ArraySchema<

of<TInner extends AnySchema>(schema: TInner): ArraySchema<TInner> {
// FIXME: this should return a new instance of array without the default to be
var next = this.clone();
let next = this.clone();

if (!isSchema(schema))
throw new TypeError(
Expand Down
4 changes: 2 additions & 2 deletions src/object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ export default class ObjectSchema<
}
}

return next.withMutation((next: any) => next.shape(nextFields));
return next.withMutation(() => next.shape(nextFields));
}

getDefaultFromShape(): DefaultFromShape<TShape> {
Expand Down Expand Up @@ -376,7 +376,7 @@ export default class ObjectSchema<
delete fields[key];
}

return next.withMutation((next: any) => next.shape(fields));
return next.withMutation(() => next.shape(fields));
}

from(from: string, to: keyof TShape, alias?: boolean) {
Expand Down
2 changes: 2 additions & 0 deletions test/types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-unused-expressions */
/* eslint-disable no-unused-labels */
/* eslint-disable no-unused-expressions */

Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7392,10 +7392,10 @@ locate-path@^5.0.0:
dependencies:
p-locate "^4.1.0"

lodash-es@^4.17.11:
version "4.17.15"
resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.15.tgz#21bd96839354412f23d7a10340e5eac6ee455d78"
integrity sha512-rlrc3yU3+JNOpZ9zj5pQtxnx2THmvRykwL4Xlxoa8I9lHBlVbbyPhgyPMioxVZ4NqyxaVVtaJnzsyOidQIhyyQ==
lodash-es@^4.17.15:
version "4.17.20"
resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.20.tgz#29f6332eefc60e849f869c264bc71126ad61e8f7"
integrity sha512-JD1COMZsq8maT6mnuz1UMV0jvYD0E0aUsSOdrr1/nAG3dhqQXwRRgeW0cSqH1U43INKcqxaiVIQNOUDld7gRDA==

lodash._reinterpolate@~3.0.0:
version "3.0.0"
Expand Down

0 comments on commit 1aba3b8

Please sign in to comment.