This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Description
- Version: 0.11.0
- Subsystem: ipfs-http-client
Severity: Very Low
Description:
I tried using an instance of the https client using TS just like how it's in the docs. When I did create the instance my IDE complained about type errors.
Steps to reproduce the error:
I created the instance like this by looking at the README
const client = create("https://ipfs.provider.io:5001/api/v0");
This was the type error:
Type '"https://ipfs.provider.io:5001/api/v0"' has no properties in common with type 'Options'.ts(2559)
Turns out create() only accepts Options | undefined as params.
So I had to pass the URL like this:
const client = create({ url: "https://ipfs.provider.io:5001/api/v0" });
Should I raise a PR to update the examples in the README?