fix(common): update request headers/params setter method types to accept partial objects

The runtime schema uses .catch() fallbacks for all fields (`key`, `value`, `active`, `description`), making them effectively optional at runtime. Updated type definitions to use Partial<> to match actual runtime behavior and prevent type errors in usage.

This allows valid usage patterns like:

``
hopp.request.setHeaders([{ key: "X-Custom", value: "foo" }])
```

Without requiring all fields (`active`, `description`) to be explicitly provided.
This commit is contained in:
jamesgeorge007 2025-10-31 11:17:14 +05:30
parent dae02c839f
commit c939c4f0c8

View file

@ -275,10 +275,10 @@ declare namespace hopp {
setUrl(url: string): void
setMethod(method: string): void
setHeader(name: string, value: string): void
setHeaders(headers: HoppRESTHeader[]): void
setHeaders(headers: Array<Partial<HoppRESTHeader>>): void
removeHeader(key: string): void
setParam(name: string, value: string): void
setParams(params: HoppRESTParam[]): void
setParams(params: Array<Partial<HoppRESTParam>>): void
removeParam(key: string): void
/**
* Set or update request body with automatic merging