From 1c0a085696ed4a9c7e5bbf0b95f6a2e8c08b065f Mon Sep 17 00:00:00 2001 From: bluelovers Date: Mon, 5 Jul 2021 00:35:00 +0800 Subject: [PATCH] feat(ipfs-http-client): add type `IPFSHttpClient` --- packages/ipfs-http-client/src/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/ipfs-http-client/src/index.js b/packages/ipfs-http-client/src/index.js index c9c9551b29..fec24882e0 100644 --- a/packages/ipfs-http-client/src/index.js +++ b/packages/ipfs-http-client/src/index.js @@ -12,13 +12,14 @@ const urlSource = require('ipfs-utils/src/files/url-source') /** * @typedef {import('./types').EndpointConfig} EndpointConfig * @typedef {import('./types').Options} Options + * @typedef {import('ipfs-core-types').IPFS & { getEndpointConfig(): EndpointConfig }} IPFSHttpClient */ /** * @param {Options} options */ function create (options = {}) { - /** @type {import('ipfs-core-types').IPFS & { getEndpointConfig: () => EndpointConfig }} */ + /** @type {IPFSHttpClient} */ const client = { add: require('./add')(options), addAll: require('./add-all')(options),