Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@effect/platform

Package Overview
Dependencies
Maintainers
3
Versions
399
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@effect/platform - npm Package Compare versions

Comparing version 0.13.10 to 0.13.11

54

Http/Router.d.ts

@@ -12,2 +12,3 @@ /**

import type * as Error from "@effect/platform/Http/ServerError";
import type * as ServerRequest from "@effect/platform/Http/ServerRequest";
import type * as ServerResponse from "@effect/platform/Http/ServerResponse";

@@ -63,3 +64,3 @@ import type * as ParseResult from "@effect/schema/ParseResult";

*/
type Handler<R, E> = Effect.Effect<R, E, ServerResponse.ServerResponse>;
type Handler<R, E> = Effect.Effect<R | RouteContext | ServerRequest.ServerRequest, E, ServerResponse.ServerResponse>;
}

@@ -149,4 +150,4 @@ /**

export declare const mountApp: {
<R1, E1>(path: string, that: App.Default<R1, E1>): <R, E>(self: Router<R, E>) => Router<R1 | R, E1 | E>;
<R, E, R1, E1>(self: Router<R, E>, path: string, that: App.Default<R1, E1>): Router<R | R1, E | E1>;
<R1, E1>(path: string, that: App.Default<R1, E1>): <R, E>(self: Router<R, E>) => Router<Exclude<R1, RouteContext | ServerRequest.ServerRequest> | Exclude<R, RouteContext | ServerRequest.ServerRequest>, E1 | E>;
<R, E, R1, E1>(self: Router<R, E>, path: string, that: App.Default<R1, E1>): Router<Exclude<R, RouteContext | ServerRequest.ServerRequest> | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E | E1>;
};

@@ -157,5 +158,5 @@ /**

*/
export declare const route: (method: Method.Method) => {
<R1, E1>(path: string, handler: Route.Handler<R1, E1>): <R, E>(self: Router<R, E>) => Router<R | Exclude<R1, RouteContext>, E1 | E>;
<R, E, R1, E1>(self: Router<R, E>, path: string, handler: Route.Handler<R1, E1>): Router<R | Exclude<R1, RouteContext>, E | E1>;
export declare const route: (method: Method.Method | "*") => {
<R1, E1>(path: string, handler: Route.Handler<R1, E1>): <R, E>(self: Router<R, E>) => Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E1 | E>;
<R, E, R1, E1>(self: Router<R, E>, path: string, handler: Route.Handler<R1, E1>): Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E | E1>;
};

@@ -167,4 +168,4 @@ /**

export declare const all: {
<R1, E1>(path: string, handler: Route.Handler<R1, E1>): <R, E>(self: Router<R, E>) => Router<R | Exclude<R1, RouteContext>, E1 | E>;
<R, E, R1, E1>(self: Router<R, E>, path: string, handler: Route.Handler<R1, E1>): Router<R | Exclude<R1, RouteContext>, E | E1>;
<R1, E1>(path: string, handler: Route.Handler<R1, E1>): <R, E>(self: Router<R, E>) => Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E1 | E>;
<R, E, R1, E1>(self: Router<R, E>, path: string, handler: Route.Handler<R1, E1>): Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E | E1>;
};

@@ -176,4 +177,4 @@ /**

export declare const get: {
<R1, E1>(path: string, handler: Route.Handler<R1, E1>): <R, E>(self: Router<R, E>) => Router<R | Exclude<R1, RouteContext>, E1 | E>;
<R, E, R1, E1>(self: Router<R, E>, path: string, handler: Route.Handler<R1, E1>): Router<R | Exclude<R1, RouteContext>, E | E1>;
<R1, E1>(path: string, handler: Route.Handler<R1, E1>): <R, E>(self: Router<R, E>) => Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E1 | E>;
<R, E, R1, E1>(self: Router<R, E>, path: string, handler: Route.Handler<R1, E1>): Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E | E1>;
};

@@ -185,4 +186,4 @@ /**

export declare const post: {
<R1, E1>(path: string, handler: Route.Handler<R1, E1>): <R, E>(self: Router<R, E>) => Router<R | Exclude<R1, RouteContext>, E1 | E>;
<R, E, R1, E1>(self: Router<R, E>, path: string, handler: Route.Handler<R1, E1>): Router<R | Exclude<R1, RouteContext>, E | E1>;
<R1, E1>(path: string, handler: Route.Handler<R1, E1>): <R, E>(self: Router<R, E>) => Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E1 | E>;
<R, E, R1, E1>(self: Router<R, E>, path: string, handler: Route.Handler<R1, E1>): Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E | E1>;
};

@@ -194,4 +195,4 @@ /**

export declare const patch: {
<R1, E1>(path: string, handler: Route.Handler<R1, E1>): <R, E>(self: Router<R, E>) => Router<R | Exclude<R1, RouteContext>, E1 | E>;
<R, E, R1, E1>(self: Router<R, E>, path: string, handler: Route.Handler<R1, E1>): Router<R | Exclude<R1, RouteContext>, E | E1>;
<R1, E1>(path: string, handler: Route.Handler<R1, E1>): <R, E>(self: Router<R, E>) => Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E1 | E>;
<R, E, R1, E1>(self: Router<R, E>, path: string, handler: Route.Handler<R1, E1>): Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E | E1>;
};

@@ -203,4 +204,4 @@ /**

export declare const put: {
<R1, E1>(path: string, handler: Route.Handler<R1, E1>): <R, E>(self: Router<R, E>) => Router<R | Exclude<R1, RouteContext>, E1 | E>;
<R, E, R1, E1>(self: Router<R, E>, path: string, handler: Route.Handler<R1, E1>): Router<R | Exclude<R1, RouteContext>, E | E1>;
<R1, E1>(path: string, handler: Route.Handler<R1, E1>): <R, E>(self: Router<R, E>) => Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E1 | E>;
<R, E, R1, E1>(self: Router<R, E>, path: string, handler: Route.Handler<R1, E1>): Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E | E1>;
};

@@ -212,4 +213,4 @@ /**

export declare const del: {
<R1, E1>(path: string, handler: Route.Handler<R1, E1>): <R, E>(self: Router<R, E>) => Router<R | Exclude<R1, RouteContext>, E1 | E>;
<R, E, R1, E1>(self: Router<R, E>, path: string, handler: Route.Handler<R1, E1>): Router<R | Exclude<R1, RouteContext>, E | E1>;
<R1, E1>(path: string, handler: Route.Handler<R1, E1>): <R, E>(self: Router<R, E>) => Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E1 | E>;
<R, E, R1, E1>(self: Router<R, E>, path: string, handler: Route.Handler<R1, E1>): Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E | E1>;
};

@@ -221,4 +222,4 @@ /**

export declare const head: {
<R1, E1>(path: string, handler: Route.Handler<R1, E1>): <R, E>(self: Router<R, E>) => Router<R | Exclude<R1, RouteContext>, E1 | E>;
<R, E, R1, E1>(self: Router<R, E>, path: string, handler: Route.Handler<R1, E1>): Router<R | Exclude<R1, RouteContext>, E | E1>;
<R1, E1>(path: string, handler: Route.Handler<R1, E1>): <R, E>(self: Router<R, E>) => Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E1 | E>;
<R, E, R1, E1>(self: Router<R, E>, path: string, handler: Route.Handler<R1, E1>): Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E | E1>;
};

@@ -230,4 +231,4 @@ /**

export declare const options: {
<R1, E1>(path: string, handler: Route.Handler<R1, E1>): <R, E>(self: Router<R, E>) => Router<R | Exclude<R1, RouteContext>, E1 | E>;
<R, E, R1, E1>(self: Router<R, E>, path: string, handler: Route.Handler<R1, E1>): Router<R | Exclude<R1, RouteContext>, E | E1>;
<R1, E1>(path: string, handler: Route.Handler<R1, E1>): <R, E>(self: Router<R, E>) => Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E1 | E>;
<R, E, R1, E1>(self: Router<R, E>, path: string, handler: Route.Handler<R1, E1>): Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E | E1>;
};

@@ -238,3 +239,6 @@ /**

*/
export declare const use: (<R, E, R1, E1>(f: (self: Route.Handler<R, E>) => Route.Handler<R1, E1>) => (self: Router<R, E>) => Router<R1, E1>) & (<R_1, E_1, R1_1, E1_1>(self: Router<R_1, E_1>, f: (self: Route.Handler<R_1, E_1>) => Route.Handler<R1_1, E1_1>) => Router<R1_1, E1_1>);
export declare const use: {
<R, E, R1, E1>(f: (self: Route.Handler<R, E>) => App.Default<R1, E1>): (self: Router<R, E>) => Router<Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E1>;
<R, E, R1, E1>(self: Router<R, E>, f: (self: Route.Handler<R, E>) => App.Default<R1, E1>): Router<Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E1>;
};
/**

@@ -321,5 +325,5 @@ * @since 1.0.0

export declare const provideServiceEffect: {
<T extends Context.Tag<any, any>, R1, E1>(tag: T, effect: Effect.Effect<R1, E1, Context.Tag.Service<T>>): <R, E>(self: Router<R, E>) => Router<R1 | Exclude<R, Context.Tag.Identifier<T>>, E1 | E>;
<R, E, T extends Context.Tag<any, any>, R1, E1>(self: Router<R, E>, tag: T, effect: Effect.Effect<R1, E1, Context.Tag.Service<T>>): Router<R1 | Exclude<R, Context.Tag.Identifier<T>>, E | E1>;
<T extends Context.Tag<any, any>, R1, E1>(tag: T, effect: Effect.Effect<R1, E1, Context.Tag.Service<T>>): <R, E>(self: Router<R, E>) => Router<Exclude<R1, RouteContext | ServerRequest.ServerRequest> | Exclude<R, Context.Tag.Identifier<T>>, E1 | E>;
<R, E, T extends Context.Tag<any, any>, R1, E1>(self: Router<R, E>, tag: T, effect: Effect.Effect<R1, E1, Context.Tag.Service<T>>): Router<Exclude<R1, RouteContext | ServerRequest.ServerRequest> | Exclude<R, Context.Tag.Identifier<T>>, E | E1>;
};
//# sourceMappingURL=Router.d.ts.map
{
"name": "@effect/platform",
"version": "0.13.10",
"version": "0.13.11",
"description": "Unified interfaces for common platform-specific services",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -12,2 +12,3 @@ /**

import type * as Error from "@effect/platform/Http/ServerError"
import type * as ServerRequest from "@effect/platform/Http/ServerRequest"
import type * as ServerResponse from "@effect/platform/Http/ServerResponse"

@@ -72,3 +73,3 @@ import * as internal from "@effect/platform/internal/http/router"

export type Handler<R, E> = Effect.Effect<
R,
R | RouteContext | ServerRequest.ServerRequest,
E,

@@ -202,5 +203,11 @@ ServerResponse.ServerResponse

export const mountApp: {
<R1, E1>(path: string, that: App.Default<R1, E1>): <R, E>(
<R1, E1>(
path: string,
that: App.Default<R1, E1>
): <R, E>(
self: Router<R, E>
) => Router<R1 | R, E1 | E>
) => Router<
Exclude<R1, RouteContext | ServerRequest.ServerRequest> | Exclude<R, RouteContext | ServerRequest.ServerRequest>,
E1 | E
>
<R, E, R1, E1>(

@@ -210,3 +217,6 @@ self: Router<R, E>,

that: App.Default<R1, E1>
): Router<R | R1, E | E1>
): Router<
Exclude<R, RouteContext | ServerRequest.ServerRequest> | Exclude<R1, RouteContext | ServerRequest.ServerRequest>,
E | E1
>
} = internal.mountApp

@@ -218,6 +228,9 @@

*/
export const route: (method: Method.Method) => {
<R1, E1>(path: string, handler: Route.Handler<R1, E1>): <R, E>(
self: Router<R, E>
) => Router<R | Exclude<R1, RouteContext>, E1 | E>
export const route: (
method: Method.Method | "*"
) => {
<R1, E1>(
path: string,
handler: Route.Handler<R1, E1>
): <R, E>(self: Router<R, E>) => Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E1 | E>
<R, E, R1, E1>(

@@ -227,3 +240,3 @@ self: Router<R, E>,

handler: Route.Handler<R1, E1>
): Router<R | Exclude<R1, RouteContext>, E | E1>
): Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E | E1>
} = internal.route

@@ -236,5 +249,6 @@

export const all: {
<R1, E1>(path: string, handler: Route.Handler<R1, E1>): <R, E>(
self: Router<R, E>
) => Router<R | Exclude<R1, RouteContext>, E1 | E>
<R1, E1>(
path: string,
handler: Route.Handler<R1, E1>
): <R, E>(self: Router<R, E>) => Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E1 | E>
<R, E, R1, E1>(

@@ -244,3 +258,3 @@ self: Router<R, E>,

handler: Route.Handler<R1, E1>
): Router<R | Exclude<R1, RouteContext>, E | E1>
): Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E | E1>
} = internal.all

@@ -253,5 +267,6 @@

export const get: {
<R1, E1>(path: string, handler: Route.Handler<R1, E1>): <R, E>(
self: Router<R, E>
) => Router<R | Exclude<R1, RouteContext>, E1 | E>
<R1, E1>(
path: string,
handler: Route.Handler<R1, E1>
): <R, E>(self: Router<R, E>) => Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E1 | E>
<R, E, R1, E1>(

@@ -261,3 +276,3 @@ self: Router<R, E>,

handler: Route.Handler<R1, E1>
): Router<R | Exclude<R1, RouteContext>, E | E1>
): Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E | E1>
} = internal.get

@@ -270,5 +285,6 @@

export const post: {
<R1, E1>(path: string, handler: Route.Handler<R1, E1>): <R, E>(
self: Router<R, E>
) => Router<R | Exclude<R1, RouteContext>, E1 | E>
<R1, E1>(
path: string,
handler: Route.Handler<R1, E1>
): <R, E>(self: Router<R, E>) => Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E1 | E>
<R, E, R1, E1>(

@@ -278,3 +294,3 @@ self: Router<R, E>,

handler: Route.Handler<R1, E1>
): Router<R | Exclude<R1, RouteContext>, E | E1>
): Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E | E1>
} = internal.post

@@ -287,5 +303,6 @@

export const patch: {
<R1, E1>(path: string, handler: Route.Handler<R1, E1>): <R, E>(
self: Router<R, E>
) => Router<R | Exclude<R1, RouteContext>, E1 | E>
<R1, E1>(
path: string,
handler: Route.Handler<R1, E1>
): <R, E>(self: Router<R, E>) => Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E1 | E>
<R, E, R1, E1>(

@@ -295,3 +312,3 @@ self: Router<R, E>,

handler: Route.Handler<R1, E1>
): Router<R | Exclude<R1, RouteContext>, E | E1>
): Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E | E1>
} = internal.patch

@@ -304,5 +321,6 @@

export const put: {
<R1, E1>(path: string, handler: Route.Handler<R1, E1>): <R, E>(
self: Router<R, E>
) => Router<R | Exclude<R1, RouteContext>, E1 | E>
<R1, E1>(
path: string,
handler: Route.Handler<R1, E1>
): <R, E>(self: Router<R, E>) => Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E1 | E>
<R, E, R1, E1>(

@@ -312,3 +330,3 @@ self: Router<R, E>,

handler: Route.Handler<R1, E1>
): Router<R | Exclude<R1, RouteContext>, E | E1>
): Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E | E1>
} = internal.put

@@ -321,5 +339,6 @@

export const del: {
<R1, E1>(path: string, handler: Route.Handler<R1, E1>): <R, E>(
self: Router<R, E>
) => Router<R | Exclude<R1, RouteContext>, E1 | E>
<R1, E1>(
path: string,
handler: Route.Handler<R1, E1>
): <R, E>(self: Router<R, E>) => Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E1 | E>
<R, E, R1, E1>(

@@ -329,3 +348,3 @@ self: Router<R, E>,

handler: Route.Handler<R1, E1>
): Router<R | Exclude<R1, RouteContext>, E | E1>
): Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E | E1>
} = internal.del

@@ -338,5 +357,6 @@

export const head: {
<R1, E1>(path: string, handler: Route.Handler<R1, E1>): <R, E>(
self: Router<R, E>
) => Router<R | Exclude<R1, RouteContext>, E1 | E>
<R1, E1>(
path: string,
handler: Route.Handler<R1, E1>
): <R, E>(self: Router<R, E>) => Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E1 | E>
<R, E, R1, E1>(

@@ -346,3 +366,3 @@ self: Router<R, E>,

handler: Route.Handler<R1, E1>
): Router<R | Exclude<R1, RouteContext>, E | E1>
): Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E | E1>
} = internal.head

@@ -355,5 +375,6 @@

export const options: {
<R1, E1>(path: string, handler: Route.Handler<R1, E1>): <R, E>(
self: Router<R, E>
) => Router<R | Exclude<R1, RouteContext>, E1 | E>
<R1, E1>(
path: string,
handler: Route.Handler<R1, E1>
): <R, E>(self: Router<R, E>) => Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E1 | E>
<R, E, R1, E1>(

@@ -363,3 +384,3 @@ self: Router<R, E>,

handler: Route.Handler<R1, E1>
): Router<R | Exclude<R1, RouteContext>, E | E1>
): Router<R | Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E | E1>
} = internal.options

@@ -371,3 +392,11 @@

*/
export const use = internal.use
export const use: {
<R, E, R1, E1>(
f: (self: Route.Handler<R, E>) => App.Default<R1, E1>
): (self: Router<R, E>) => Router<Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E1>
<R, E, R1, E1>(
self: Router<R, E>,
f: (self: Route.Handler<R, E>) => App.Default<R1, E1>
): Router<Exclude<R1, RouteContext | ServerRequest.ServerRequest>, E1>
} = internal.use

@@ -507,3 +536,3 @@ /**

self: Router<R, E>
) => Router<R1 | Exclude<R, Context.Tag.Identifier<T>>, E1 | E>
) => Router<Exclude<R1, RouteContext | ServerRequest.ServerRequest> | Exclude<R, Context.Tag.Identifier<T>>, E1 | E>
<R, E, T extends Context.Tag<any, any>, R1, E1>(

@@ -513,3 +542,3 @@ self: Router<R, E>,

effect: Effect.Effect<R1, E1, Context.Tag.Service<T>>
): Router<R1 | Exclude<R, Context.Tag.Identifier<T>>, E | E1>
): Router<Exclude<R1, RouteContext | ServerRequest.ServerRequest> | Exclude<R, Context.Tag.Identifier<T>>, E | E1>
} = internal.provideServiceEffect

@@ -15,2 +15,3 @@ import * as Chunk from "@effect/data/Chunk"

import * as ServerRequest from "@effect/platform/Http/ServerRequest"
import type * as ServerResponse from "@effect/platform/Http/ServerResponse"
import * as Schema from "@effect/schema/Schema"

@@ -137,3 +138,3 @@ import * as Channel from "@effect/stream/Channel"

return Effect.mapInputContext(
route.handler,
route.handler as Effect.Effect<Exclude<R, Router.RouteContext>, E, ServerResponse.ServerResponse>,
(context) =>

@@ -246,3 +247,5 @@ Context.add(

that: App.Default<R1, E1>
) => <R, E>(self: Router.Router<R, E>) => Router.Router<R | R1, E | E1>,
) => <R, E>(
self: Router.Router<R, E>
) => Router.Router<Exclude<R | R1, Router.RouteContext | ServerRequest.ServerRequest>, E | E1>,
<R, E, R1, E1>(

@@ -252,6 +255,7 @@ self: Router.Router<R, E>,

that: App.Default<R1, E1>
) => Router.Router<R | R1, E | E1>
) => Router.Router<Exclude<R | R1, Router.RouteContext | ServerRequest.ServerRequest>, E | E1>
>(
3,
(self, path, that) => new RouterImpl(self.routes, Chunk.append(self.mounts, [removeTrailingSlash(path), that]) as any)
(self, path, that) =>
new RouterImpl<any, any>(self.routes, Chunk.append(self.mounts, [removeTrailingSlash(path), that]))
)

@@ -264,3 +268,5 @@

handler: Router.Route.Handler<R1, E1>
): <R, E>(self: Router.Router<R, E>) => Router.Router<R | Exclude<R1, Router.RouteContext>, E1 | E>
): <R, E>(
self: Router.Router<R, E>
) => Router.Router<R | Exclude<R1, Router.RouteContext | ServerRequest.ServerRequest>, E1 | E>
<R, E, R1, E1>(

@@ -270,3 +276,3 @@ self: Router.Router<R, E>,

handler: Router.Route.Handler<R1, E1>
): Router.Router<R | Exclude<R1, Router.RouteContext>, E | E1>
): Router.Router<R | Exclude<R1, Router.RouteContext | ServerRequest.ServerRequest>, E | E1>
} =>

@@ -277,3 +283,5 @@ dual<

handler: Router.Route.Handler<R1, E1>
) => <R, E>(self: Router.Router<R, E>) => Router.Router<R | Exclude<R1, Router.RouteContext>, E | E1>,
) => <R, E>(
self: Router.Router<R, E>
) => Router.Router<R | Exclude<R1, Router.RouteContext | ServerRequest.ServerRequest>, E | E1>,
<R, E, R1, E1>(

@@ -283,3 +291,3 @@ self: Router.Router<R, E>,

handler: Router.Route.Handler<R1, E1>
) => Router.Router<R | Exclude<R1, Router.RouteContext>, E | E1>
) => Router.Router<R | Exclude<R1, Router.RouteContext | ServerRequest.ServerRequest>, E | E1>
>(3, (self, path, handler) =>

@@ -318,13 +326,13 @@ new RouterImpl(

<R, E, R1, E1>(
f: (self: Router.Route.Handler<R, E>) => Router.Route.Handler<R1, E1>
) => (self: Router.Router<R, E>) => Router.Router<R1, E1>,
f: (self: Router.Route.Handler<R, E>) => App.Default<R1, E1>
) => (self: Router.Router<R, E>) => Router.Router<Exclude<R1, Router.RouteContext | ServerRequest.ServerRequest>, E1>,
<R, E, R1, E1>(
self: Router.Router<R, E>,
f: (self: Router.Route.Handler<R, E>) => Router.Route.Handler<R1, E1>
) => Router.Router<R1, E1>
f: (self: Router.Route.Handler<R, E>) => App.Default<R1, E1>
) => Router.Router<Exclude<R1, Router.RouteContext | ServerRequest.ServerRequest>, E1>
>(2, (self, f) =>
new RouterImpl(
new RouterImpl<any, any>(
Chunk.map(
self.routes,
(route) => new RouteImpl(route.method, route.path, f(route.handler), route.prefix)
(route) => new RouteImpl(route.method, route.path, f(route.handler) as any, route.prefix)
),

@@ -424,3 +432,7 @@ Chunk.map(

) => Router.Router<Exclude<R, Context.Tag.Identifier<T>>, E>
>(3, (self, tag, service) => use(self, Effect.provideService(tag, service)))
>(3, <R, E, T extends Context.Tag<any, any>>(
self: Router.Router<R, E>,
tag: T,
service: Context.Tag.Service<T>
): Router.Router<Exclude<R, Context.Tag.Identifier<T>>, E> => use(self, Effect.provideService(tag, service)))

@@ -432,3 +444,8 @@ /* @internal */

effect: Effect.Effect<R1, E1, Context.Tag.Service<T>>
) => <R, E>(self: Router.Router<R, E>) => Router.Router<R1 | Exclude<R, Context.Tag.Identifier<T>>, E | E1>,
) => <R, E>(
self: Router.Router<R, E>
) => Router.Router<
Exclude<R1, Router.RouteContext | ServerRequest.ServerRequest> | Exclude<R, Context.Tag.Identifier<T>>,
E | E1
>,
<R, E, T extends Context.Tag<any, any>, R1, E1>(

@@ -438,3 +455,6 @@ self: Router.Router<R, E>,

effect: Effect.Effect<R1, E1, Context.Tag.Service<T>>
) => Router.Router<R1 | Exclude<R, Context.Tag.Identifier<T>>, E | E1>
) => Router.Router<
Exclude<R1, Router.RouteContext | ServerRequest.ServerRequest> | Exclude<R, Context.Tag.Identifier<T>>,
E | E1
>
>(3, <R, E, T extends Context.Tag<any, any>, R1, E1>(

@@ -441,0 +461,0 @@ self: Router.Router<R, E>,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc