fermyon / spin-js-sdk

https://developer.fermyon.com/spin/javascript-components
Apache License 2.0
52 stars 18 forks source link

Typed options for `fetch` #90

Closed radu-matei closed 1 year ago

radu-matei commented 1 year ago

The fetch function in the SDK takes an optional parameter options, which is defined as object in the TypeScript SDK:

    function fetch(uri: string, options?: object): Promise<FetchResult>;

This means there is no type checking for the options parameter, which makes fetch requests quite error prone.

karthik2804 commented 1 year ago

closed with #95