postmanlabs / postman-collection

Javascript module that allows a developer to work with Postman Collections
https://www.postmanlabs.com/postman-collection/
Apache License 2.0
456 stars 215 forks source link

Update methods should have Partial<DefinitionType> type #1277

Open ThePlenkov opened 2 years ago

ThePlenkov commented 2 years ago

Hi!

When I call any update method like for example for request:

image

Typescript now asks me to provide all the fields, which is not the way you designed of course.

So intead of this line https://github.com/postmanlabs/postman-collection/blob/42c7416080e5f8a0ab76101e979afbd700304665/types/index.d.ts#L1910

i would suggest to have something like this

update(options: Partial<Request.definition>): void;

will solve the problem entirely.

However I'm not sure how you guys build this file, manually or with some tool too , that's why don't create MR yet.

Thanks!