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

[email protected] - Out of date types for BWOptions #3985

Closed
@SgtPooki

Description

@SgtPooki

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch [email protected] for the project I'm working on.

A number is no longer valid for the interval property of BWOptions. In order to successfully call the ipfs.stats.bw endpoint with TypeScript, you must either //@ts-ignore or avoid passing interval.

See https://docs.ipfs.io/reference/http/api/#api-v0-stats-bw

Here is the diff that solved my problem:

diff --git a/node_modules/ipfs-core-types/src/stats/index.ts b/node_modules/ipfs-core-types/src/stats/index.ts
index 43e5f24..30dbf86 100644
--- a/node_modules/ipfs-core-types/src/stats/index.ts
+++ b/node_modules/ipfs-core-types/src/stats/index.ts
@@ -16,7 +16,7 @@ export interface BWOptions extends AbortOptions {
   peer?: string
   proto?: string
   poll?: boolean
-  interval?: number
+  interval?: string
 }
 
 export interface BWResult {

This issue body was partially generated by patch-package.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions