• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

yiming-liao / logry / 19127807272

06 Nov 2025 03:07AM UTC coverage: 95.603% (-0.3%) from 95.92%
19127807272

push

github

yiming-liao
chore(release): bump version to 2.0.0

448 of 505 branches covered (88.71%)

Branch coverage included in aggregate %.

3901 of 4044 relevant lines covered (96.46%)

3.88 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

64.0
/src/core/handler-manager/utils/is-handler-class.ts
1
import type { HandlerClass } from "@/core/handler-manager/types";
1✔
2

1✔
3
/**
1✔
4
 * Checks if the given object is a HandlerClass.
1✔
5
 *
1✔
6
 * A HandlerClass is an object with a "handle" method.
1✔
7
 *
1✔
8
 * @param obj - The object to check.
1✔
9
 * @returns True if obj has a "handle" function, false otherwise.
1✔
10
 */
1✔
11
export const isHandlerClass = (obj: unknown): obj is HandlerClass => {
1✔
12
  // Return false if not an object or null
6✔
13
  if (typeof obj !== "object" || obj === null) {
6!
14
    return false;
6✔
15
  }
6✔
16

×
17
  // Type assertion for checking "handle" method existence
×
18
  const maybeHandler = obj as Record<string, unknown>;
×
19

×
20
  // Check if "handle" is a function
×
21
  return typeof maybeHandler.handle === "function";
×
22
};
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc