Header menu logo Falco.UnionRoutes

PreCondition<'T> Type

Marks a route field as coming from a precondition extractor (auth, validation, etc.) rather than from route or query parameters.

PreCondition<'T> is STRICT - it always runs and cannot be skipped by child routes.

Use OverridablePreCondition when child routes need to skip the precondition.

Example

 type PostRoute =
     | List                                       // No auth required
     | Create of PreCondition<UserId>             // Requires authenticated user
     | Delete of PreCondition<UserId> * id: Guid  // Auth + route param
type PostRoute = | List | Create of obj | Delete of obj * id: obj
Multiple items
module List from Microsoft.FSharp.Collections

--------------------
type List<'T> = | op_Nil | op_ColonColon of Head: 'T * Tail: 'T list interface IReadOnlyList<'T> interface IReadOnlyCollection<'T> interface IEnumerable interface IEnumerable<'T> member GetReverseIndex: rank: int * offset: int -> int member GetSlice: startIndex: int option * endIndex: int option -> 'T list static member Cons: head: 'T * tail: 'T list -> 'T list member Head: 'T with get member IsEmpty: bool with get member Item: index: int -> 'T with get ...
val id: x: 'T -> 'T

Union cases

Union case Description

PreCondition 'T

Full Usage: PreCondition 'T

Parameters:
    Item : 'T

Item : 'T

Type something to start searching.