From 563eb514d3955c06a9d6e4f386f8b16afc2adae3 Mon Sep 17 00:00:00 2001 From: Lasse <16150076+lnist@users.noreply.github.com> Date: Mon, 15 Jan 2024 15:08:01 +0100 Subject: [PATCH 1/2] fix(docs): Fix various @see vs @link (#1735) --- CHANGELOG.md | 2 ++ src/kandel/coreKandelInstance.ts | 12 ++++++------ .../geometricKandelDistributionHelper.ts | 4 ++-- .../geometricKandel/geometricKandelInstance.ts | 8 ++++---- src/liquidityProvider.ts | 4 ++-- src/util/trade.ts | 2 +- 6 files changed, 17 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2300f04ef..dd984641a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Next version +- fix: Fix various issues in TypeDoc comments wrt @see vs @link. + # 2.0.2 - feat: Updated exports in index.ts to export all referenced types. diff --git a/src/kandel/coreKandelInstance.ts b/src/kandel/coreKandelInstance.ts index 66cee0979..a1227a523 100644 --- a/src/kandel/coreKandelInstance.ts +++ b/src/kandel/coreKandelInstance.ts @@ -43,8 +43,8 @@ export type KandelParameters = { /** * @notice Parameters for a Kandel instance where provided properties override current values. baseQuoteTickOffset takes precedence over priceRatio. Note that baseQuoteTickOffset and pricePoints are normally provided via the KandelDistribution. - * @see KandelParameters for more information. - * @remarks Cannot simply be Partial due to Big vs Bigish. + * @see{@link KandelParameters} for more information. + * @remarks Cannot simply be `Partial` due to Big vs Bigish. */ export type KandelParameterOverrides = { gasprice?: number; @@ -113,7 +113,7 @@ class CoreKandelInstance { }; } - /** Constructor. @see create */ + /** Constructor. See {@link createCoreParams} */ protected constructor(params: { address: string; kandel: typechain.CoreKandel; @@ -372,7 +372,7 @@ class CoreKandelInstance { * @param offerType The offer type to get the minimum volume for. * @param offerType The offer type to get the minimum volume for. * @returns The minimum volume for the given offer type. - * @dev @see seeder.getMinimumVolumeForGasreq for parameterized function. + * @see {@link KandelSeeder.getMinimumVolumeForGasreq} for parameterized function. */ public async getMinimumVolume(offerType: Market.BA) { return this.seeder.getMinimumVolumeForGasreq({ @@ -656,7 +656,7 @@ class CoreKandelInstance { * @param params.parameters The parameters to set leave out values to keep their current value. If gasprice is not set, the current gasprice and cover factor is used. * @param params.depositBaseAmount The amount of base to deposit. If not provided, then no base is deposited. * @param params.depositQuoteAmount The amount of quote to deposit. If not provided, then no quote is deposited. - * @param params.funds The amount of funds to provision. If not provided, then the required funds are provisioned according to @see getRequiredProvision. + * @param params.funds The amount of funds to provision. If not provided, then the required funds are provisioned according to {@link getRequiredProvision}. * @param overrides The ethers overrides to use when calling the populate and populateChunk functions. * @returns The raw parameters. */ @@ -710,7 +710,7 @@ class CoreKandelInstance { * @param params.parameters The parameters to set leave out values to keep their current value. If gasprice is not set, the current gasprice and cover factor is used. * @param params.depositBaseAmount The amount of base to deposit. If not provided, then no base is deposited. * @param params.depositQuoteAmount The amount of quote to deposit. If not provided, then no quote is deposited. - * @param params.funds The amount of funds to provision. If not provided, then the required funds are provisioned according to @see getRequiredProvision. (if a distribution is provided) + * @param params.funds The amount of funds to provision. If not provided, then the required funds are provisioned according to {@link getRequiredProvision}. (if a distribution is provided) * @param params.maxOffersInChunk The maximum number of offers to include in a single populate transaction. If not provided, then KandelConfiguration is used. * @param overrides The ethers overrides to use when calling the populate and populateChunk functions. * @returns The transaction(s) used to populate the offers. diff --git a/src/kandel/geometricKandel/geometricKandelDistributionHelper.ts b/src/kandel/geometricKandel/geometricKandelDistributionHelper.ts index 6133cc615..dcb49ff17 100644 --- a/src/kandel/geometricKandel/geometricKandelDistributionHelper.ts +++ b/src/kandel/geometricKandel/geometricKandelDistributionHelper.ts @@ -123,8 +123,8 @@ class GeometricKandelDistributionHelper { } /** Gets tick based parameters for a distribution based on tick or price params. - * @param params The distribution parameters, @see DistributionParams - * @returns The tick based parameters, @see TickDistributionParams + * @param params The distribution parameters, see {@link DistributionParams} + * @returns The tick based parameters, see {@link TickDistributionParams} */ public getTickDistributionParams( params: Omit, diff --git a/src/kandel/geometricKandel/geometricKandelInstance.ts b/src/kandel/geometricKandel/geometricKandelInstance.ts index 8ef2f7c49..eb1892fe2 100644 --- a/src/kandel/geometricKandel/geometricKandelInstance.ts +++ b/src/kandel/geometricKandel/geometricKandelInstance.ts @@ -33,7 +33,7 @@ export type GeometricKandelParameters = { /** * @notice Parameters specific to a geometric Kandel instance where provided properties override current values. baseQuoteTickOffset takes precedence over priceRatio. Note that baseQuoteTickOffset and pricePoints are normally provided via the KandelDistribution. * @see GeometricKandelParameters for more information. - * @remarks Cannot simply be Partial due to Big vs Bigish. + * @remarks Cannot simply be `Partial` due to Big vs Bigish. */ export type GeometricKandelParameterOverrides = { baseQuoteTickOffset?: number; @@ -91,7 +91,7 @@ class GeometricKandelInstance extends CoreKandelInstance { }); } - /** Constructor. @see create */ + /** Constructor. See {@link create} */ protected constructor(params: { address: string; kandel: typechain.CoreKandel; @@ -239,7 +239,7 @@ class GeometricKandelInstance extends CoreKandelInstance { /** Calculates a new uniform distribution based on the available base and quote balance and min price and mid price. * @param params The parameters for the new distribution. * @param params.midPrice The current mid price of the market used to discern expected bids from asks. - * @param params.minPrice The minimum price to generate the distribution from; can be retrieved from the status from @see getOfferStatus or @see getOfferStatusFromOffers . + * @param params.minPrice The minimum price to generate the distribution from; can be retrieved from the status from {@link getOfferStatuses} or {@link getOfferStatusFromOffers} . * @param params.generateFromMid Whether to generate the distribution outwards from the midPrice or upwards from the minPrice. * @param params.minimumBasePerOffer The minimum base token volume per offer. If not provided, then the minimum base token volume is used. * @param params.minimumQuotePerOffer The minimum quote token volume per offer. If not provided, then the minimum quote token volume is used. @@ -289,7 +289,7 @@ class GeometricKandelInstance extends CoreKandelInstance { * @param params.geometricParameters The geometric parameters to set leave out values to keep their current value. * @param params.depositBaseAmount The amount of base to deposit. If not provided, then no base is deposited. * @param params.depositQuoteAmount The amount of quote to deposit. If not provided, then no quote is deposited. - * @param params.funds The amount of funds to provision. If not provided, then the required funds are provisioned according to @see getRequiredProvision. + * @param params.funds The amount of funds to provision. If not provided, then the required funds are provisioned according to {@link getRequiredProvision}. * @param params.maxOffersInChunk The maximum number of offers to include in a single populate transaction. If not provided, then KandelConfiguration is used. * @param params.populateMode The mode to use when populating the offers. If not provided, then "reduceCallData" is used - it computes offers on-chain but reduces the amount of call data; "saveGas" computes offers off-chain and sends them as call data, but saves gas. * @param overrides The ethers overrides to use when calling the populate and populateChunk functions. diff --git a/src/liquidityProvider.ts b/src/liquidityProvider.ts index 8b95ac21e..1873b38ef 100644 --- a/src/liquidityProvider.ts +++ b/src/liquidityProvider.ts @@ -152,14 +152,14 @@ class LiquidityProvider { } } - /** Gets the missing provision in ethers for a bid using @see computeOfferProvision. */ + /** Gets the missing provision in ethers for a bid using {@link computeOfferProvision}. */ computeBidProvision( opts: { id?: number; gasreq?: number; gasprice?: number } = {}, ): Promise { return this.computeOfferProvision("bids", opts); } - /** Gets the missing provision in ethers for an ask using @see computeOfferProvision. */ + /** Gets the missing provision in ethers for an ask using {@link computeOfferProvision}. */ computeAskProvision( opts: { id?: number; gasreq?: number; gasprice?: number } = {}, ): Promise { diff --git a/src/util/trade.ts b/src/util/trade.ts index 3f0e41735..898c578c4 100644 --- a/src/util/trade.ts +++ b/src/util/trade.ts @@ -802,7 +802,7 @@ class Trade { } /** Determines the parameters for a resting order which can be provided via default configuration value. - * @param params The resting order params. @see Market.RestingOrderParams. + * @param params The resting order params. See {@link Market.RestingOrderParams}. * @param market The market. * @param ba The BA of the taker order; the resting order will be the opposite. * @returns The resting order parameters. From fc02fde8415b7117ceb7d46b780cf0f8609b2bca Mon Sep 17 00:00:00 2001 From: Mangrove Automation Bot <134297173+mangrove-automation@users.noreply.github.com> Date: Mon, 15 Jan 2024 15:23:45 +0100 Subject: [PATCH 2/2] Merge publish/v2.0.3 to master Published by GitHub user: lnist --- CHANGELOG.md | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd984641a..e8473887e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,7 @@ # Next version +# 2.0.3 + - fix: Fix various issues in TypeDoc comments wrt @see vs @link. # 2.0.2 diff --git a/package.json b/package.json index 5320836f0..817e8a9ee 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mangrovedao/mangrove.js", - "version": "2.0.2", + "version": "2.0.3", "author": "Mangrove DAO", "description": "A Typescript SDK for the Mangrove Protocol.", "license": "MIT",