Skip to content

Commit

Permalink
fix(shared): revert unexpected type changes (close #1610)
Browse files Browse the repository at this point in the history
  • Loading branch information
meteorlxy committed Sep 30, 2024
1 parent c5364ea commit d21a934
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/shared/src/utils/typeGuards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ export const isFunction = (val: unknown): val is Function =>
/**
* Check if a value is plain object, with generic type support
*/
export const isPlainObject = <
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
T extends Record<string, unknown> = Record<string, unknown>,
>(
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unnecessary-type-parameters
export const isPlainObject = <T extends Record<any, any> = Record<any, any>>(
val: unknown,
): val is T => Object.prototype.toString.call(val) === '[object Object]'

Expand Down

0 comments on commit d21a934

Please sign in to comment.