struct

Noir::JSRouteExtractor::HandlerFacts

Inherits Struct < Value < Object

What a resolved handler's definition reads and calls. app.get('/x', search()) in server.ts has nothing on its own line; the req.query.q and the sequelize.query(...) live in routes/search.ts, and an agent asking --sink sql needs them on the route. One hop: the definition's own body (for a factory, that includes the closure it returns), cached per definition because factories are reused across routes. responds says the body answers the request itself (sends and never calls bare next()), which is what tells a path-mounted handler from a path-mounted guard.

Constructors

new(params : Array(Param), callees : Array(JSCalleeExtractor::Entry), responds : Bool, guard : Bool = false, renders_locals : Bool = false, passes_on : Bool = false, writes_locals : Bool = false, sends : Bool = true)
Source

Instance methods

callees
clone
Source
copy_with(params _params = @params, callees _callees = @callees, responds _responds = @responds, guard _guard = @guard, renders_locals _renders_locals = @renders_locals, passes_on _passes_on = @passes_on, writes_locals _writes_locals = @writes_locals, sends _sends = @sends)
Source
guard
params
passes_on
renders_locals
responds
sends
writes_locals