mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
chore: revert apply decorators signature (regression)
This commit is contained in:
@@ -1,39 +1,3 @@
|
|||||||
/**
|
|
||||||
* Function that returns a new decorator that applies all decorators provided by param
|
|
||||||
*
|
|
||||||
* Useful to build new decorators (or a decorator factory) encapsulating multiple decorators related with the same feature
|
|
||||||
*
|
|
||||||
* @param decorators one or more decorators (e.g., `ApplyGuard(...)`)
|
|
||||||
*
|
|
||||||
* @publicApi
|
|
||||||
*/
|
|
||||||
export function applyDecorators(
|
|
||||||
...decorators: Array<ClassDecorator>
|
|
||||||
): ClassDecorator;
|
|
||||||
/**
|
|
||||||
* Function that returns a new decorator that applies all decorators provided by param
|
|
||||||
*
|
|
||||||
* Useful to build new decorators (or a decorator factory) encapsulating multiple decorators related with the same feature
|
|
||||||
*
|
|
||||||
* @param decorators one or more decorators (e.g., `ApplyGuard(...)`)
|
|
||||||
*
|
|
||||||
* @publicApi
|
|
||||||
*/
|
|
||||||
export function applyDecorators(
|
|
||||||
...decorators: Array<MethodDecorator>
|
|
||||||
): MethodDecorator;
|
|
||||||
/**
|
|
||||||
* Function that returns a new decorator that applies all decorators provided by param
|
|
||||||
*
|
|
||||||
* Useful to build new decorators (or a decorator factory) encapsulating multiple decorators related with the same feature
|
|
||||||
*
|
|
||||||
* @param decorators one or more decorators (e.g., `ApplyGuard(...)`)
|
|
||||||
*
|
|
||||||
* @publicApi
|
|
||||||
*/
|
|
||||||
export function applyDecorators(
|
|
||||||
...decorators: Array<PropertyDecorator>
|
|
||||||
): PropertyDecorator;
|
|
||||||
/**
|
/**
|
||||||
* Function that returns a new decorator that applies all decorators provided by param
|
* Function that returns a new decorator that applies all decorators provided by param
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { expect } from 'chai';
|
import { expect } from 'chai';
|
||||||
import { applyDecorators, UseGuards } from '../../decorators';
|
|
||||||
import { GUARDS_METADATA } from '../../constants';
|
import { GUARDS_METADATA } from '../../constants';
|
||||||
|
import { applyDecorators, UseGuards } from '../../decorators';
|
||||||
import { CanActivate } from '../../interfaces';
|
import { CanActivate } from '../../interfaces';
|
||||||
|
|
||||||
describe('applyDecorators', () => {
|
describe('applyDecorators', () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user