@@ -9,42 +9,58 @@ export function Injectable(): ClassDecorator {
99}
1010
1111/**
12+ * @deprecated
1213 * Defines the Component. The component can inject dependencies through constructor.
1314 * Those dependencies have to belong to the same module.
1415 */
1516export function Component ( ) : ClassDecorator {
16- deprecate ( 'The @Component() decorator is deprecated and will be removed within next major release. Use @Injectable() instead.' )
17+ deprecate (
18+ 'The @Component() decorator is deprecated and will be removed within next major release. Use @Injectable() instead.' ,
19+ ) ;
1720 return ( target : object ) => { } ;
1821}
1922
2023/**
24+ * @deprecated
2125 * Defines the Pipe. The Pipe should implement the `PipeTransform` interface.
2226 */
2327export function Pipe ( ) : ClassDecorator {
28+ deprecate (
29+ 'The @Pipe() decorator is deprecated and will be removed within next major release. Use @Injectable() instead.' ,
30+ ) ;
2431 return ( target : object ) => { } ;
2532}
2633
2734/**
35+ * @deprecated
2836 * Defines the Guard. The Guard should implement the `CanActivate` interface.
2937 */
3038export function Guard ( ) : ClassDecorator {
31- deprecate ( 'The @Guard() decorator is deprecated and will be removed within next major release. Use @Injectable() instead.' )
39+ deprecate (
40+ 'The @Guard() decorator is deprecated and will be removed within next major release. Use @Injectable() instead.' ,
41+ ) ;
3242 return ( target : object ) => { } ;
3343}
3444
3545/**
46+ * @deprecated
3647 * Defines the Middleware. The Middleware should implement the `NestMiddleware` interface.
3748 */
3849export function Middleware ( ) : ClassDecorator {
39- deprecate ( 'The @Middleware() decorator is deprecated and will be removed within next major release. Use @Injectable() instead.' )
50+ deprecate (
51+ 'The @Middleware() decorator is deprecated and will be removed within next major release. Use @Injectable() instead.' ,
52+ ) ;
4053 return ( target : object ) => { } ;
4154}
4255
4356/**
57+ * @deprecated
4458 * Defines the Interceptor. The Interceptor should implement `HttpInterceptor`, `RpcInterceptor` or `WsInterceptor` interface.
4559 */
4660export function Interceptor ( ) : ClassDecorator {
47- deprecate ( 'The @Interceptor() decorator is deprecated and will be removed within next major release. Use @Injectable() instead.' )
61+ deprecate (
62+ 'The @Interceptor() decorator is deprecated and will be removed within next major release. Use @Injectable() instead.' ,
63+ ) ;
4864 return ( target : object ) => { } ;
4965}
5066
0 commit comments