• Parameter decorator which injects the Express Response object into the decorated route

    Example

    @Controller('/api', 'User', 'User Management Routes')
    class User {

    @HttpGet('/user', 'List users in the system')
    async listUsers(
    @Query('search') search: string,
    @Response() res: ExpressResponse
    ): Promise<void> {
    ...
    }
    }

    Type Parameters

    • T

      Class method to be registered with the Express application as a route

    Returns ((target: T, propertyKey: string, parameterIndex: number) => void)

      • (target: T, propertyKey: string, parameterIndex: number): void
      • Parameters

        • target: T
        • propertyKey: string
        • parameterIndex: number

        Returns void

Generated using TypeDoc