Skip to content

Commit

Permalink
feat: Make options optional
Browse files Browse the repository at this point in the history
Currently `ValidationPipe` requires `options` to be defined, forcing you to include a default e.g. `{}`  if you don't have any options to specify.
  • Loading branch information
devlzcode authored May 7, 2024
1 parent 1674d2e commit 241ddf9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/typeschema/src/lib/typeschema.pipe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export class ValidationPipe implements PipeTransform {
constructor(
@Optional()
@Inject(TypeschemaOptions)
private readonly options: ValidationPipeOptions,
private readonly options?: ValidationPipeOptions,
@Optional() protected readonly logger?: Logger
) {}
async transform(value: unknown, metadata: ArgumentMetadata) {
Expand Down

0 comments on commit 241ddf9

Please sign in to comment.