Rejection | @uirouter/react
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Rejection

Index

Constructors

constructor

  • new Rejection(type: number, message?: string, detail?: any): Rejection

Properties

detail

detail: any

A detail object

This value varies based on the mechanism for rejecting the transition. For example, if an error was thrown from a hook, the detail will be the Error object. If a hook returned a rejected promise, the detail will be the rejected value.

message

message: string

A message describing the rejection

redirected

redirected: boolean

Indicates if the transition was redirected.

When a transition is redirected, the rejection type will be RejectType.SUPERSEDED and this flag will be true.

type

The type of the rejection.

This value is an number representing the type of transition rejection. If using Typescript, this is a Typescript enum.

Methods

toPromise

toString

  • toString(): string

Static aborted

Static errored

Static ignored

Static invalid

Static isRejectionPromise

  • isRejectionPromise(obj: any): boolean

Static normalize

  • Returns a Rejection

    Normalizes a value as a Rejection. If the value is already a Rejection, returns it. Otherwise, wraps and returns the value as a Rejection (Rejection type: ERROR).

    Parameters

    Returns Rejection

    detail if it is already a Rejection, else returns an ERROR Rejection.

Static redirected

Static superseded

  • superseded(detail?: any, options?: any): Rejection

Generated using TypeDoc