This is a valid code:
> require('query-string').stringifyUrl({url:'/some'})
'/some'
Yet it emits a TS error:
Argument of type '{ url: string; }' is not assignable to parameter of type 'UrlObject'.
Property 'query' is missing in type '{ url: string; }' but required in type 'UrlObject'.ts(2345)
I believe query must be marked as query? here:
|
export interface UrlObject { |
|
readonly url: string; |
|
|
|
/** |
|
Overrides queries in the `url` property. |
|
*/ |
|
readonly query: StringifiableRecord; |
This is a valid code:
Yet it emits a TS error:
I believe
querymust be marked asquery?here:query-string/index.d.ts
Lines 369 to 375 in 2a17881