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

@foodsy-app/fastify-typebox

Package Overview
Dependencies
Maintainers
4
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@foodsy-app/fastify-typebox - npm Package Compare versions

Comparing version 4.0.1 to 5.0.0

18

index.d.ts

@@ -24,2 +24,20 @@ /// <reference types="node" />

}
interface TypeboxRouteShorthandMethod<RawServer extends RawServerBase = RawServerDefault, RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>, RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>> {
<T extends Schema, RequestGeneric extends {
Body?: Static<T["body"]>;
Querystring?: Static<T["querystring"]>;
Params?: Static<T["params"]>;
Headers?: Static<T["headers"]>;
}, ContextConfig = ContextConfigDefault>(path: string, handler: RouteHandlerMethod<RawServer, RawRequest, RawReply, RequestGeneric, ContextConfig>): FastifyInstance<RawServer, RawRequest, RawReply>;
}
interface TypeboxRouteShorthandMethod<RawServer extends RawServerBase = RawServerDefault, RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>, RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>> {
<T extends Schema, RequestGeneric extends {
Body?: Static<T["body"]>;
Querystring?: Static<T["querystring"]>;
Params?: Static<T["params"]>;
Headers?: Static<T["headers"]>;
}, ContextConfig = ContextConfigDefault>(path: string, opts: Omit<RouteShorthandOptions<RawServer, RawRequest, RawReply, RequestGeneric, ContextConfig>, "schema"> & {
schema?: Partial<T>;
}): FastifyInstance<RawServer, RawRequest, RawReply>;
}
declare module "fastify" {

@@ -26,0 +44,0 @@ interface FastifyInstance<RawServer extends RawServerBase = RawServerDefault, RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>, RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>, Logger = FastifyLoggerInstance> {

@@ -51,2 +51,44 @@ import { Static, TSchema } from "@sinclair/typebox";

interface TypeboxRouteShorthandMethod<
RawServer extends RawServerBase = RawServerDefault,
RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>
> {
<
T extends Schema,
RequestGeneric extends {
Body?: Static<T["body"]>;
Querystring?: Static<T["querystring"]>;
Params?: Static<T["params"]>;
Headers?: Static<T["headers"]>;
},
ContextConfig = ContextConfigDefault
>(
path: string,
handler: RouteHandlerMethod<RawServer, RawRequest, RawReply, RequestGeneric, ContextConfig>
): FastifyInstance<RawServer, RawRequest, RawReply>;
}
interface TypeboxRouteShorthandMethod<
RawServer extends RawServerBase = RawServerDefault,
RawRequest extends RawRequestDefaultExpression<RawServer> = RawRequestDefaultExpression<RawServer>,
RawReply extends RawReplyDefaultExpression<RawServer> = RawReplyDefaultExpression<RawServer>
> {
<
T extends Schema,
RequestGeneric extends {
Body?: Static<T["body"]>;
Querystring?: Static<T["querystring"]>;
Params?: Static<T["params"]>;
Headers?: Static<T["headers"]>;
},
ContextConfig = ContextConfigDefault
>(
path: string,
opts: Omit<RouteShorthandOptions<RawServer, RawRequest, RawReply, RequestGeneric, ContextConfig>, "schema"> & {
schema?: Partial<T>;
}
): FastifyInstance<RawServer, RawRequest, RawReply>;
}
declare module "fastify" {

@@ -53,0 +95,0 @@ interface FastifyInstance<

2

package.json
{
"name": "@foodsy-app/fastify-typebox",
"version": "4.0.1",
"version": "5.0.0",
"description": "Plugin for Fastify to prevent having to write duplicate type definitions for schemas",

@@ -5,0 +5,0 @@ "keywords": [

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