@@ -7,14 +7,15 @@ import { CustomParamFactory } from '../../interfaces/features/custom-route-param
77import { RouteParamsMetadata , ParamData } from './route-params.decorator' ;
88import { PipeTransform } from '../../index' ;
99import { isNil , isString } from '../../utils/shared.utils' ;
10+ import { Type } from '../../interfaces' ;
1011
1112const assignCustomMetadata = (
1213 args : RouteParamsMetadata ,
1314 paramtype : number | string ,
1415 index : number ,
1516 factory : CustomParamFactory ,
1617 data ?: ParamData ,
17- ...pipes : PipeTransform < any > [ ] ,
18+ ...pipes : ( Type < PipeTransform > | PipeTransform ) [ ] ,
1819) => ( {
1920 ...args ,
2021 [ `${ paramtype } ${ CUSTOM_ROUTE_AGRS_METADATA } :${ index } ` ] : {
@@ -36,9 +37,9 @@ const randomString = () =>
3637 */
3738export function createParamDecorator (
3839 factory : CustomParamFactory ,
39- ) : ( data ?: any , ...pipes : PipeTransform < any > [ ] ) => ParameterDecorator {
40+ ) : ( data ?: any , ...pipes : ( Type < PipeTransform > | PipeTransform ) [ ] ) => ParameterDecorator {
4041 const paramtype = randomString ( ) + randomString ( ) ;
41- return ( data ?, ...pipes : PipeTransform < any > [ ] ) : ParameterDecorator => (
42+ return ( data ?, ...pipes : ( Type < PipeTransform > | PipeTransform ) [ ] ) : ParameterDecorator => (
4243 target ,
4344 key ,
4445 index ,
@@ -61,7 +62,7 @@ export function createParamDecorator(
6162 */
6263export function createRouteParamDecorator (
6364 factory : CustomParamFactory ,
64- ) : ( data ?: any , ...pipes : PipeTransform < any > [ ] ) => ParameterDecorator {
65+ ) : ( data ?: any , ...pipes : ( Type < PipeTransform > | PipeTransform ) [ ] ) => ParameterDecorator {
6566 deprecate (
6667 'The "createRouteParamDecorator" function is deprecated and will be removed within next major release. Use "createParamDecorator" instead.' ,
6768 ) ;
0 commit comments