express-router-api
Advanced tools
Comparing version 1.3.1 to 1.3.2
@@ -18,6 +18,6 @@ import { Request, Response, Router, RouterOptions } from 'express'; | ||
} | ||
declare type ApiResult = SimpleApiResult | ApiResponse; | ||
declare type AsyncApiResult = Observable<ApiResult> | Promise<ApiResult>; | ||
declare type ErrorFormatter = (err: Error, req: Request, res: Response) => AsyncApiResult | ApiResult; | ||
declare type SuccessFormatter = (data: ApiResult, req: Request, res: Response) => AsyncApiResult | ApiResult; | ||
export declare type ApiResult = SimpleApiResult | ApiResponse; | ||
export declare type AsyncApiResult = Observable<ApiResult> | Promise<ApiResult>; | ||
export declare type ErrorFormatter = (err: Error, req: Request, res: Response) => AsyncApiResult | ApiResult; | ||
export declare type SuccessFormatter = (data: ApiResult, req: Request, res: Response) => AsyncApiResult | ApiResult; | ||
export interface ApiRouterOptions extends RouterOptions { | ||
@@ -24,0 +24,0 @@ errorFormatter?: ErrorFormatter; |
{ | ||
"name": "express-router-api", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"description": "Express router that lets you construct your API entirely on promises", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -1,2 +0,5 @@ | ||
import { NextFunction, Request, RequestHandler, RequestParamHandler, Response, Router, RouterOptions, IRoute } from 'express'; | ||
import { | ||
IRoute, NextFunction, Request, RequestHandler, | ||
RequestParamHandler, Response, Router, RouterOptions, | ||
} from 'express'; | ||
import { PathParams, RequestHandlerParams } from 'express-serve-static-core'; | ||
@@ -37,7 +40,7 @@ import { defer, forkJoin, from, identity, isObservable, Observable, of, throwError } from 'rxjs'; | ||
type ApiResult = SimpleApiResult | ApiResponse; | ||
type AsyncApiResult = Observable<ApiResult> | Promise<ApiResult>; | ||
export type ApiResult = SimpleApiResult | ApiResponse; | ||
export type AsyncApiResult = Observable<ApiResult> | Promise<ApiResult>; | ||
type ErrorFormatter = (err: Error, req: Request, res: Response) => AsyncApiResult | ApiResult; | ||
type SuccessFormatter = (data: ApiResult, req: Request, res: Response) => AsyncApiResult | ApiResult; | ||
export type ErrorFormatter = (err: Error, req: Request, res: Response) => AsyncApiResult | ApiResult; | ||
export type SuccessFormatter = (data: ApiResult, req: Request, res: Response) => AsyncApiResult | ApiResult; | ||
@@ -44,0 +47,0 @@ export interface ApiRouterOptions extends RouterOptions { |
@@ -46,3 +46,3 @@ { | ||
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ | ||
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ | ||
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ | ||
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ | ||
@@ -49,0 +49,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
78918
859