AlexanderMac / http-z

Parse/build HTTP message to/from model
MIT License
18 stars 6 forks source link

Incorrect type defs in typescript #63

Closed tx46 closed 7 months ago

tx46 commented 8 months ago

for query params and headers, you have typed the value as value?: string, meaning it can be string or undefined. looking through the code, these will never be undefined and so should be typed properly to value: string

https://github.com/AlexanderMac/http-z/blob/e7464193a225aaf7814d3355e19c77949c6188bc/src/utils.js#L45 https://github.com/AlexanderMac/http-z/blob/e7464193a225aaf7814d3355e19c77949c6188bc/src/parsers/base.js#L38-L39

thank you for an awesome lib

AlexanderMac commented 7 months ago

Thank you for raising the issue. Fixed.