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

bridge

Package Overview
Dependencies
Maintainers
2
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bridge - npm Package Compare versions

Comparing version 2.0.70 to 2.0.71

dist/test.d.ts

23

dist/source/core/types.d.ts

@@ -1,2 +0,2 @@

import { MidsReturnsIntersection, MidsParams, ExcludeNeverKeysObj, Pretify } from '../utilities';
import { ExcludeNeverKeysObj, Pretify } from '../utilities';
import { DataParser, BridgeHandler, InferDataParser, FilesConfig } from './handlers';

@@ -12,13 +12,22 @@ import { FormidableFile } from '../utilities';

}
type ReturnTypeOf<T> = T extends (...args: any[]) => infer R ? R : never;
type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
type IntersecOfResolveReturnTypesWithoutError<T extends Readonly<BridgeHandler<any, any>[]>> = T extends Readonly<BridgeHandler<infer F, any>[]> ? Omit<UnionToIntersection<ReturnTypeOf<F>>, 'error'> : never;
type MidParams<T extends Readonly<BridgeHandler<any, any>[]>> = T extends Readonly<BridgeHandler<infer F, any>[]> ? Parameters<F>[number] & {
body: {};
query: {};
headers: {};
} : never;
export type CreateHandler = <Resolve extends (p: Pretify<ExcludeNeverKeysObj<{
middlewares: MidsReturnsIntersection<Middelwares> extends never ? {} : MidsReturnsIntersection<Middelwares>;
body: (InferDataParser<Body> extends never ? {} : InferDataParser<Body>) & (MidsParams<Middelwares>['body'] extends never ? {} : MidsParams<Middelwares>['body']);
query: (InferDataParser<Query> extends never ? {} : InferDataParser<Query>) & (MidsParams<Middelwares>['query'] extends never ? {} : MidsParams<Middelwares>['query']);
headers: (InferDataParser<Headers> extends never ? {} : InferDataParser<Headers>) & (MidsParams<Middelwares>['headers'] extends never ? {} : MidsParams<Middelwares>['headers']);
files: Files extends ['BridgeFilesDoNotExists'] ? {} : Files extends 'any' ? {
middlewares: Pretify<IntersecOfResolveReturnTypesWithoutError<Middelwares>>;
body: Pretify<(InferDataParser<Body> extends never ? {} : InferDataParser<Body>) & (MidParams<Middelwares>['body'] extends never ? {} : MidParams<Middelwares>['body'])>;
query: Pretify<(InferDataParser<Query> extends never ? {} : InferDataParser<Query>) & (MidParams<Middelwares>['query'] extends never ? {} : MidParams<Middelwares>['query'])>;
headers: Pretify<(InferDataParser<Headers> extends never ? {} : InferDataParser<Headers>) & (MidParams<Middelwares>['headers'] extends never ? {} : MidParams<Middelwares>['headers'])>;
files: Pretify<Files extends ['BridgeFilesDoNotExists'] ? {} : Files extends 'any' ? {
[key: string]: FormidableFile;
} : {
[key in Files[number]]: FormidableFile;
};
}>;
}>>) => Res, Res, Body extends DataParser<Record<any, any>> = never, Query extends DataParser<Record<string, any>> = never, Headers extends DataParser<Record<string, any>> = never, Files extends FilesConfig = ['BridgeFilesDoNotExists'], Middelwares extends ReadonlyArray<BridgeHandler> = never>(p: BridgeParams<Resolve, Middelwares, Body, Query, Headers, Files>) => BridgeHandler<Resolve, Middelwares>;
export {};
//# sourceMappingURL=types.d.ts.map
{
"name": "bridge",
"version": "2.0.70",
"version": "2.0.71",
"description": "Bridge is a Typescript Node.js framework that provides an easy and scalable way to create REST APIs while generating the client code.",

@@ -5,0 +5,0 @@ "author": "Bridge Team <support@bridge.codes>",

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