Skip to content

Commit

Permalink
feat(nestjs): strict mode friendly
Browse files Browse the repository at this point in the history
  • Loading branch information
nartc committed Jan 31, 2021
1 parent b9a6b86 commit 64abad4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
8 changes: 7 additions & 1 deletion packages/nestjs/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
{ "extends": "../../.eslintrc.json", "ignorePatterns": ["!**/*"], "rules": {} }
{
"extends": "../../.eslintrc.json",
"ignorePatterns": ["!**/*"],
"rules": {
"@typescript-eslint/no-explicit-any": 0
}
}
4 changes: 2 additions & 2 deletions packages/nestjs/src/lib/interceptors/map.interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ function createMapInterceptor(
to: unknown,
from: unknown,
options?: { isArray?: boolean; mapperName?: string }
): new (...args) => NestInterceptor {
): new (...args: any[]) => NestInterceptor {
const { isArray = false, mapperName, ...mapOptions } = options || {};
const transformedMapOptions = isEmpty(mapOptions) ? null : mapOptions;
const transformedMapOptions = isEmpty(mapOptions) ? undefined : mapOptions;

class MixinMapInterceptor implements NestInterceptor {
constructor(
Expand Down
4 changes: 2 additions & 2 deletions packages/nestjs/src/lib/interceptors/memoize.util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ const defaultKey = 'default';

// eslint-disable-next-line @typescript-eslint/ban-types
export function memoize(fn: Function) {
const cache = {};
return (...args) => {
const cache: any = {};
return (...args: any[]) => {
const n =
args.reduce(
(key, arg) =>
Expand Down

0 comments on commit 64abad4

Please sign in to comment.