[]previous and next page

notFound

Control flow: throw the result to report not-found.

Control flow: throw the result to report not-found.

Import#

ts
import { notFound } from "@shadow-js/dusk";

Signature#

ts
function notFound(options?: {
  readonly routeId?: string;
}): NotFoundSignal

Parameters#

Name Description
options Optional route id to attribute the not-found to. Defaults to the throwing route.

Returns#

The signal to throw.

Examples#

ts
import { notFound } from "@shadow-js/router/core";
throw notFound({ routeId: "post" }); // a not-found signal attributed to the "post" route