type-alias / @typed/router

AnyLayer

A widened Effect Layer accepted as a route dependency.

Package version
1.0.0-beta.13
Category
Route services
Since
1.0.0

Import

import type { AnyLayer } from "@typed/router";

Signatures

export type AnyLayer = Layer.Layer<any, any, any> | Layer.Layer<never, any, any> | Layer.Layer<any, never, any> | Layer.Layer<any, any, never> | Layer.Layer<never, never, never> | Layer.Layer<any, never, never> | Layer.Layer<never, any, never> | Layer.Layer<never, never, any>;

Why

Matcher internals can store heterogeneous Layers while public overloads retain precise types.

Ownership and lifetime

This alias is compile-time only. A concrete Layer is acquired only for candidate evaluation; the layer manager commits it for the selected route or rolls it back on rejection.

Other public imports

These import paths expose the same declaration. Each page retains its own public name and signature.

Source