Fix some TSDoc comments
This commit is contained in:
parent
d0ce9f7046
commit
b643739ec7
2 changed files with 5 additions and 3 deletions
|
@ -74,7 +74,7 @@ export default class Box<V> implements IBox<V> {
|
|||
* 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
|
||||
|
|
|
@ -83,11 +83,13 @@ export interface IDerivation<V> {
|
|||
* 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.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue