Skip to content

Commit 35053d0

Browse files
refactor(): remove trailing commas
1 parent 385071b commit 35053d0

7 files changed

Lines changed: 28 additions & 28 deletions

File tree

packages/common/decorators/core/use-interceptors.decorator.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { INTERCEPTORS_METADATA } from '../../constants';
2+
import { NestInterceptor } from '../../interfaces';
23
import { extendArrayMetadata } from '../../utils/extend-metadata.util';
34
import { isFunction } from '../../utils/shared.utils';
45
import { validateEach } from '../../utils/validate-each.util';
5-
import { NestInterceptor } from '../../interfaces';
66

77
/**
88
* Binds interceptors to the particular context.
@@ -15,7 +15,7 @@ import { NestInterceptor } from '../../interfaces';
1515
* @param {} ...interceptors
1616
*/
1717
export function UseInterceptors(
18-
...interceptors: (NestInterceptor | Function)[],
18+
...interceptors: (NestInterceptor | Function)[]
1919
) {
2020
return (target: any, key?, descriptor?) => {
2121
const isValidInterceptor = interceptor =>

packages/common/decorators/http/create-route-param-metadata.decorator.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const assignCustomMetadata = (
1616
index: number,
1717
factory: CustomParamFactory,
1818
data?: ParamData,
19-
...pipes: (Type<PipeTransform> | PipeTransform)[],
19+
...pipes: (Type<PipeTransform> | PipeTransform)[]
2020
) => ({
2121
...args,
2222
[`${paramtype}${CUSTOM_ROUTE_AGRS_METADATA}:${index}`]: {
@@ -37,12 +37,12 @@ export function createParamDecorator(
3737
factory: CustomParamFactory,
3838
enhancers: ParamDecoratorEnhancer[] = [],
3939
): (
40-
...dataOrPipes: (Type<PipeTransform> | PipeTransform | any)[],
40+
...dataOrPipes: (Type<PipeTransform> | PipeTransform | any)[]
4141
) => ParameterDecorator {
4242
const paramtype = uuid();
4343
return (
4444
data?,
45-
...pipes: (Type<PipeTransform> | PipeTransform)[],
45+
...pipes: (Type<PipeTransform> | PipeTransform)[]
4646
): ParameterDecorator => (target, key, index) => {
4747
const args =
4848
Reflect.getMetadata(ROUTE_ARGS_METADATA, target.constructor, key) || {};
@@ -81,7 +81,7 @@ export function createRouteParamDecorator(
8181
factory: CustomParamFactory,
8282
): (
8383
data?: any,
84-
...pipes: (Type<PipeTransform> | PipeTransform)[],
84+
...pipes: (Type<PipeTransform> | PipeTransform)[]
8585
) => ParameterDecorator {
8686
deprecate(
8787
'The "createRouteParamDecorator" function is deprecated and will be removed within next major release. Use "createParamDecorator" instead.',

packages/common/decorators/http/route-params.decorator.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const assignMetadata = (
1717
paramtype: RouteParamtypes,
1818
index: number,
1919
data?: ParamData,
20-
...pipes: (Type<PipeTransform> | PipeTransform)[],
20+
...pipes: (Type<PipeTransform> | PipeTransform)[]
2121
) => ({
2222
...args,
2323
[`${paramtype}:${index}`]: {
@@ -42,7 +42,7 @@ const createRouteParamDecorator = (paramtype: RouteParamtypes) => {
4242

4343
const createPipesRouteParamDecorator = (paramtype: RouteParamtypes) => (
4444
data?,
45-
...pipes: (Type<PipeTransform> | PipeTransform)[],
45+
...pipes: (Type<PipeTransform> | PipeTransform)[]
4646
): ParameterDecorator => (target, key, index) => {
4747
const args =
4848
Reflect.getMetadata(ROUTE_ARGS_METADATA, target.constructor, key) || {};
@@ -70,9 +70,9 @@ export const Next: () => ParameterDecorator = createRouteParamDecorator(
7070
export const Session: () => ParameterDecorator = createRouteParamDecorator(
7171
RouteParamtypes.SESSION,
7272
);
73-
export const UploadedFile: (fileKey?: string) => ParameterDecorator = createRouteParamDecorator(
74-
RouteParamtypes.FILE,
75-
);
73+
export const UploadedFile: (
74+
fileKey?: string,
75+
) => ParameterDecorator = createRouteParamDecorator(RouteParamtypes.FILE);
7676
export const UploadedFiles: () => ParameterDecorator = createRouteParamDecorator(
7777
RouteParamtypes.FILES,
7878
);
@@ -84,11 +84,11 @@ export function Query();
8484
export function Query(...pipes: (Type<PipeTransform> | PipeTransform)[]);
8585
export function Query(
8686
property: string,
87-
...pipes: (Type<PipeTransform> | PipeTransform)[],
87+
...pipes: (Type<PipeTransform> | PipeTransform)[]
8888
);
8989
export function Query(
9090
property?: string | (Type<PipeTransform> | PipeTransform),
91-
...pipes: (Type<PipeTransform> | PipeTransform)[],
91+
...pipes: (Type<PipeTransform> | PipeTransform)[]
9292
) {
9393
return createPipesRouteParamDecorator(RouteParamtypes.QUERY)(
9494
property,
@@ -100,11 +100,11 @@ export function Body();
100100
export function Body(...pipes: (Type<PipeTransform> | PipeTransform)[]);
101101
export function Body(
102102
property: string,
103-
...pipes: (Type<PipeTransform> | PipeTransform)[],
103+
...pipes: (Type<PipeTransform> | PipeTransform)[]
104104
);
105105
export function Body(
106106
property?: string | (Type<PipeTransform> | PipeTransform),
107-
...pipes: (Type<PipeTransform> | PipeTransform)[],
107+
...pipes: (Type<PipeTransform> | PipeTransform)[]
108108
) {
109109
return createPipesRouteParamDecorator(RouteParamtypes.BODY)(
110110
property,
@@ -116,11 +116,11 @@ export function Param();
116116
export function Param(...pipes: (Type<PipeTransform> | PipeTransform)[]);
117117
export function Param(
118118
property: string,
119-
...pipes: (Type<PipeTransform> | PipeTransform)[],
119+
...pipes: (Type<PipeTransform> | PipeTransform)[]
120120
);
121121
export function Param(
122122
property?: string | (Type<PipeTransform> | PipeTransform),
123-
...pipes: (Type<PipeTransform> | PipeTransform)[],
123+
...pipes: (Type<PipeTransform> | PipeTransform)[]
124124
) {
125125
return createPipesRouteParamDecorator(RouteParamtypes.PARAM)(
126126
property,

packages/core/injector/instance-loader.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ export class InstanceLoader {
5151

5252
private async createInstancesOfComponents(module: Module) {
5353
await Promise.all(
54-
[...module.components.values()].map(
55-
async wrapper => this.injector.loadInstanceOfComponent(wrapper, module),
54+
[...module.components.values()].map(async wrapper =>
55+
this.injector.loadInstanceOfComponent(wrapper, module),
5656
),
5757
);
5858
}
@@ -65,8 +65,8 @@ export class InstanceLoader {
6565

6666
private async createInstancesOfRoutes(module: Module) {
6767
await Promise.all(
68-
[...module.routes.values()].map(
69-
async wrapper => this.injector.loadInstanceOfRoute(wrapper, module),
68+
[...module.routes.values()].map(async wrapper =>
69+
this.injector.loadInstanceOfRoute(wrapper, module),
7070
),
7171
);
7272
}
@@ -82,8 +82,8 @@ export class InstanceLoader {
8282

8383
private async createInstancesOfInjectables(module: Module) {
8484
await Promise.all(
85-
[...module.injectables.values()].map(
86-
async wrapper => this.injector.loadInstanceOfInjectable(wrapper, module),
85+
[...module.injectables.values()].map(async wrapper =>
86+
this.injector.loadInstanceOfInjectable(wrapper, module),
8787
),
8888
);
8989
}

packages/core/middleware/builder.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class MiddlewareBuilder implements MiddlewareConsumer {
1717
constructor(private readonly routesMapper: RoutesMapper) {}
1818

1919
public apply(
20-
...middleware: Array<Type<any> | Function | any>,
20+
...middleware: Array<Type<any> | Function | any>
2121
): MiddlewareConfigProxy {
2222
return new MiddlewareBuilder.ConfigProxy(this, flatten(middleware));
2323
}
@@ -56,7 +56,7 @@ export class MiddlewareBuilder implements MiddlewareConsumer {
5656
}
5757

5858
public exclude(
59-
...routes: Array<string | RouteInfo>,
59+
...routes: Array<string | RouteInfo>
6060
): MiddlewareConfigProxy {
6161
const { routesMapper } = this.builder;
6262
this.excludedRoutes = this.mapRoutesToFlatList(
@@ -66,7 +66,7 @@ export class MiddlewareBuilder implements MiddlewareConsumer {
6666
}
6767

6868
public forRoutes(
69-
...routes: Array<string | Type<any> | RouteInfo>,
69+
...routes: Array<string | Type<any> | RouteInfo>
7070
): MiddlewareConsumer {
7171
const {
7272
middlewareCollection,

packages/microservices/client/client-redis.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export class ClientRedis extends ClientProxy {
111111
) {
112112
return undefined;
113113
}
114-
return this.getOptionsProp(this.options, 'retryDelay') || 0;
114+
return this.getOptionsProp<RedisOptions>(this.options, 'retryDelay') || 0;
115115
}
116116

117117
public createResponseCallback(): Function {

packages/microservices/server/server-redis.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,6 @@ export class ServerRedis extends Server implements CustomTransportStrategy {
139139
) {
140140
return undefined;
141141
}
142-
return this.getOptionsProp(this.options, 'retryDelay') || 0;
142+
return this.getOptionsProp<RedisOptions>(this.options, 'retryDelay') || 0;
143143
}
144144
}

0 commit comments

Comments
 (0)