From b643739ec78312c1ccd8ab3158bfc9b38d82644a Mon Sep 17 00:00:00 2001 From: Andrew Prifer Date: Tue, 15 Feb 2022 22:59:34 +0100 Subject: [PATCH] Fix some TSDoc comments --- packages/dataverse/src/Box.ts | 2 +- packages/dataverse/src/derivations/IDerivation.ts | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/dataverse/src/Box.ts b/packages/dataverse/src/Box.ts index 9b334d0..813dbae 100644 --- a/packages/dataverse/src/Box.ts +++ b/packages/dataverse/src/Box.ts @@ -74,7 +74,7 @@ export default class Box implements IBox { * Note: usages of `get()` aren't tracked, they are only for retrieving the value. To track changes, you need to * create a derivation. * - * @see derivation + * @see Box.derivation */ get() { return this._value diff --git a/packages/dataverse/src/derivations/IDerivation.ts b/packages/dataverse/src/derivations/IDerivation.ts index 05915bd..b0024e0 100644 --- a/packages/dataverse/src/derivations/IDerivation.ts +++ b/packages/dataverse/src/derivations/IDerivation.ts @@ -83,11 +83,13 @@ export interface IDerivation { * by `flatMap` takes the value of that derivation. * * @example - * // Simply using `map()` here would return the inner derivation when we call `getValue()` + * ```ts + * // Simply using map() here would return the inner derivation when we call getValue() * new Box(3).derivation.map((value) => new Box(value).derivation).getValue() * - * // Using `flatMap()` eliminates the inner derivation + * // Using flatMap() eliminates the inner derivation * new Box(3).derivation.flatMap((value) => new Box(value).derivation).getValue() + * ``` * * @param fn The mapping function to use. Note: it accepts a plain value, not a derivation. */