Result of ContextCondition#parse (used for ContextCondition#appliesTo and ContextCondition#subRequest) Parses the condition, checks if it applies to a request and returns all this information (to avoid double parsing)
Whether the condition applies to the request
Parameters of the condition (if it applies)
{ id: "123" } Copy
{ id: "123" }
SubRequest of the condition (if it applies) (used for routing and sub-routing)
{ method: "GET", path: "/api", params: { id: "123" } } Copy
{ method: "GET", path: "/api", params: { id: "123" } }
{ applies: true, parameters: () => ({ id: "123" }), subRequest: (req) => ({ ...req, path: "/api", params: { id: "123" } }) } Copy
{ applies: true, parameters: () => ({ id: "123" }), subRequest: (req) => ({ ...req, path: "/api", params: { id: "123" } }) }
Generated using TypeDoc
Result of ContextCondition#parse (used for ContextCondition#appliesTo and ContextCondition#subRequest) Parses the condition, checks if it applies to a request and returns all this information (to avoid double parsing)