MCPcopy
hub / github.com/freshframework/fresh / isHandlerByMethod

Function isHandlerByMethod

packages/fresh/src/handlers.ts:100–105  ·  view source on GitHub ↗
(
  handler: RouteHandler<D, S> | RouteHandler<D, S>[] | null,
)

Source from the content-addressed store, hash-verified

98 | HandlerByMethod<Data, State>;
99
100export function isHandlerByMethod<D, S>(
101 handler: RouteHandler<D, S> | RouteHandler<D, S>[] | null,
102): handler is HandlerByMethod<D, S> {
103 return handler !== null && !Array.isArray(handler) &&
104 typeof handler === "object";
105}
106
107/**
108 * A handler function that is invoked when a request is made to a route. The

Callers 4

fsItemsToCommandsFunction · 0.90
ensureHandlerFunction · 0.90
applyCommandsInnerFunction · 0.90
renderRouteFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected