🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@sameke/expressjs-decorators

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sameke/expressjs-decorators - npm Package Compare versions

Comparing version
1.1.4
to
1.1.5
+5
-5
dist/express.d.ts
import { Application, NextFunction, Request, Response, Router } from 'express';
export declare type MiddleWare = (req: Request, res: Response, next: NextFunction) => void;
export declare type Middleware = (req: Request, res: Response, next: NextFunction) => void;
export declare function Controller(path: string): (target: any) => void;
export declare function Get(path?: string, middleware?: MiddleWare[]): (target: any, key: string, descriptor: PropertyDescriptor) => void;
export declare function Post(path?: string, middleware?: MiddleWare[]): (target: any, key: string, descriptor: PropertyDescriptor) => void;
export declare function Put(path?: string, middleware?: MiddleWare[]): (target: any, key: string, descriptor: PropertyDescriptor) => void;
export declare function Delete(path?: string, middleware?: MiddleWare[]): (target: any, key: string, descriptor: PropertyDescriptor) => void;
export declare function Get(path?: string, middleware?: Middleware[]): (target: any, key: string, descriptor: PropertyDescriptor) => void;
export declare function Post(path?: string, middleware?: Middleware[]): (target: any, key: string, descriptor: PropertyDescriptor) => void;
export declare function Put(path?: string, middleware?: Middleware[]): (target: any, key: string, descriptor: PropertyDescriptor) => void;
export declare function Delete(path?: string, middleware?: Middleware[]): (target: any, key: string, descriptor: PropertyDescriptor) => void;
export declare function Params(name?: string): (target: any, key: string, index: number) => void;

@@ -9,0 +9,0 @@ export declare function NumParam(name: string, isFloat?: boolean): (target: any, key: string, index: number) => void;

{
"name": "@sameke/expressjs-decorators",
"version": "1.1.4",
"version": "1.1.5",
"description": "express decorators",

@@ -8,6 +8,7 @@ "main": "dist/index.js",

"scripts": {
"tsc": "tsc -p tsconfig.prod.json",
"build": "npm run tsc",
"prepare": "npm run tsc",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"build": "tsc",
"prepare": "npm run build",
"prepublishOnly": "gulp -- bump",
"postpublish": "git add . && git commit -m \"published\" && git push"
},

@@ -14,0 +15,0 @@ "repository": {

@@ -28,6 +28,6 @@ import { Application, NextFunction, Request, Response, Router } from 'express';

params: IParameterDeclaration[];
mw: MiddleWare[];
mw: Middleware[];
}
export type MiddleWare = (req: Request, res: Response, next: NextFunction) => void;
export type Middleware = (req: Request, res: Response, next: NextFunction) => void;

@@ -49,3 +49,3 @@ /**

*/
export function Get(path: string = '', middleware?: MiddleWare[]) {
export function Get(path: string = '', middleware?: Middleware[]) {
return (target: any, key: string, descriptor: PropertyDescriptor) => {

@@ -67,3 +67,3 @@ let meta = getMeta(target);

*/
export function Post(path: string = '', middleware?: MiddleWare[]) {
export function Post(path: string = '', middleware?: Middleware[]) {
return (target: any, key: string, descriptor: PropertyDescriptor) => {

@@ -85,3 +85,3 @@ let meta = getMeta(target);

*/
export function Put(path: string = '', middleware?: MiddleWare[]) {
export function Put(path: string = '', middleware?: Middleware[]) {
return (target: any, key: string, descriptor: PropertyDescriptor) => {

@@ -103,3 +103,3 @@ let meta = getMeta(target);

*/
export function Delete(path: string = '', middleware?: MiddleWare[]) {
export function Delete(path: string = '', middleware?: Middleware[]) {
return (target: any, key: string, descriptor: PropertyDescriptor) => {

@@ -106,0 +106,0 @@ let meta = getMeta(target);

{
"extends": "./tsconfig.json",
"compilerOptions": {
"allowJs": true,
"sourceMap": true
}
}
{
"extends": "./tsconfig.json",
"exclude": [
"test/",
"dist/",
"node_modules/"
]
}