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

bugfix: add missing limits.parts type #448

Closed
wants to merge 1 commit into from

Conversation

Curti-s
Copy link

@Curti-s Curti-s commented Jun 21, 2023

When registering the @fastify/multipart plugin, esp in TS projects, one cannot be able to provide a limit for parts config.
I believe that, that's not deliberate and that it's also a bug, which this PR addresses.

Checklist

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add a test for this type? We use tsd to test types

@gurgunday
Copy link
Member

I took a look at the test-d file, and I still don't get how we test a config property – just by passing an incorrect type?

* For multipart forms, the max number of parts (fields + files)
* @default 1000
*/
parts?: number;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

YOu can add the test here:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants