Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Make options optional #42

Merged
merged 2 commits into from
May 8, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
feat: Make options optional
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
commit 241ddf927772c8680e9b1488ef9a54f451ab8eb7
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