Phantom Stories Library - v0.0.8
    Preparing search index...

    Interface ResourcePattern<T, Q, R>

    Pattern for matching Resource states, used with matchWith.

    interface ResourcePattern<T, Q, R> {
        Data: (resource: Data<T, Q>) => R;
        Empty: (resource: Empty<Q>) => R;
        Failure: (resource: Failure<Q>) => R;
        Query: (resource: Query<Q>) => R;
    }

    Type Parameters

    • T

      The type of the data in Data state.

    • Q

      The type of optional parameters.

    • R

      The return type of the pattern functions.

    Index

    Properties

    Properties

    Data: (resource: Data<T, Q>) => R
    Empty: (resource: Empty<Q>) => R
    Failure: (resource: Failure<Q>) => R
    Query: (resource: Query<Q>) => R