Skip to content

Commit

Permalink
chore: minor type fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Yehonal committed Sep 25, 2024
1 parent d6d4558 commit d6afc43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion errors/src/error.helper.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ClassType } from '@nestjs-yalc/types/globals.js';
import { ClassType } from '@nestjs-yalc/types/globals.d.js';
import { isClass } from '@nestjs-yalc/utils/class.helper.js';
import { httpExceptionStatusCodes } from '@nestjs-yalc/utils/http.helper.js';
import { isDefaultErrorMixinClass } from './default.error.js';
Expand Down
6 changes: 3 additions & 3 deletions utils/src/class.helper.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ClassType } from '@nestjs-yalc/types/globals.d.js';

// Check if the class is a native class (like Error, Array, etc.)
export function isNativeClass<T>(
export function isNativeClass<T = any>(
func: any,
className?: string,
): func is ClassType<T> {
Expand All @@ -13,7 +13,7 @@ export function isNativeClass<T>(
}

// Check if the class is an ES6-style class
export function isES6Class<T>(
export function isES6Class<T = any>(
func: any,
className?: string,
): func is ClassType<T> {
Expand All @@ -25,7 +25,7 @@ export function isES6Class<T>(
}

// Check if the class is either native or ES6
export function isClass<T>(
export function isClass<T = any>(
func: any,
className?: string,
): func is ClassType<T> {
Expand Down

0 comments on commit d6afc43

Please sign in to comment.