Skip to content

Commit be00b4a

Browse files
committed
Tweak JSDoc descriptions.
1 parent ddb99ed commit be00b4a

21 files changed

Lines changed: 29 additions & 29 deletions

Cache.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ export default class Cache extends EventTarget {
5252
*/
5353

5454
/**
55-
* A unique key to access a {@link CacheValue cache value}.
55+
* Unique key to access a {@link CacheValue cache value}.
5656
* @typedef {string} CacheKey
5757
*/
5858

5959
/**
60-
* A {@link Cache.store cache store} value. If server side rendering, it should
60+
* {@link Cache.store Cache store} value. If server side rendering, it should
6161
* be JSON serializable for client hydration. It should contain information
6262
* about any errors that occurred during loading so they can be rendered, and if
6363
* server side rendering, be hydrated on the client.

Provider.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Loading from "./Loading.mjs";
99
import LoadingContext from "./LoadingContext.mjs";
1010

1111
/**
12-
* A React component to provide all the React context required to fully enable
12+
* React component to provide all the React context required to fully enable
1313
* [`graphql-react`](https://npm.im/graphql-react) functionality:
1414
*
1515
* - {@linkcode HydrationTimeStampContext}

test/Deferred.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// @ts-check
22

33
/**
4-
* A deferred promise that can be externally resolved or rejected.
4+
* Deferred promise that can be externally resolved or rejected.
55
* @template T
66
*/
77
export default class Deferred {

types.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export {};
1717
*/
1818

1919
/**
20-
* A GraphQL operation. Additional properties may be used; all are sent to the
20+
* GraphQL operation. Additional properties may be used; all are sent to the
2121
* GraphQL server.
2222
* @typedef {object} GraphQLOperation
2323
* @prop {string} query GraphQL queries or mutations.
@@ -26,7 +26,7 @@ export {};
2626
*/
2727

2828
/**
29-
* A GraphQL result.
29+
* GraphQL result.
3030
* @see [GraphQL spec for a response](https://spec.graphql.org/October2021/#sec-Response).
3131
* @template [ErrorTypes=GraphQLResultError] Possible error types.
3232
* @typedef {object} GraphQLResult
@@ -39,7 +39,7 @@ export {};
3939
*/
4040

4141
/**
42-
* A {@link GraphQLResult.errors GraphQL result error}.
42+
* {@link GraphQLResult.errors GraphQL result error}.
4343
* @see [GraphQL spec for response errors](https://spec.graphql.org/October2021/#sec-Errors).
4444
* @template {Record<string, unknown>} [Extensions=Record<string, unknown>]
4545
* Extensions to a standard GraphQL error.
@@ -53,7 +53,7 @@ export {};
5353
*/
5454

5555
/**
56-
* A {@link GraphQLResult GraphQL result} loading error generated on the client,
56+
* {@link GraphQLResult GraphQL result} loading error generated on the client,
5757
* not the GraphQL server.
5858
* @template {string} Code Error code.
5959
* @template {Record<string, unknown>} [Extensions={}] Error specific details.

useAutoAbortLoad.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
import React from "react";
77

88
/**
9-
* A React hook to create a memoized {@link Loader loader} from
10-
* another, that automatically aborts previous loading that started via this
11-
* hook when new loading starts via this hook, the hook arguments change, or the
12-
* component unmounts.
9+
* React hook to create a memoized {@link Loader loader} from another, that
10+
* automatically aborts previous loading that started via this hook when new
11+
* loading starts via this hook, the hook arguments change, or the component
12+
* unmounts.
1313
* @param {Loader} load Memoized function that starts the loading.
1414
* @returns {Loader} Memoized function that starts the loading.
1515
*/

useAutoLoad.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import useLoadOnStale from "./useLoadOnStale.mjs";
1010
/** @typedef {import("./types.mjs").Loader} Loader */
1111

1212
/**
13-
* A React hook to prevent a {@link Cache.store cache store} entry from being
13+
* React hook to prevent a {@link Cache.store cache store} entry from being
1414
* pruned while the component is mounted and automatically keep it loaded.
1515
* Previous loading that started via this hook aborts when new loading starts
1616
* via this hook, the hook arguments change, or the component unmounts.

useCache.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import Cache from "./Cache.mjs";
66
import CacheContext from "./CacheContext.mjs";
77

88
/**
9-
* A React hook to use the {@linkcode CacheContext}.
9+
* React hook to use the {@linkcode CacheContext}.
1010
* @returns {Cache} The cache.
1111
*/
1212
export default function useCache() {

useCacheEntry.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import useForceUpdate from "./useForceUpdate.mjs";
99
/** @typedef {import("./Cache.mjs").CacheValue} CacheValue */
1010

1111
/**
12-
* A React hook to get a {@link CacheValue cache value} using its
12+
* React hook to get a {@link CacheValue cache value} using its
1313
* {@link CacheKey cache key}.
1414
* @param {CacheKey} cacheKey Cache key.
1515
* @returns {CacheValue} Cache value, if present.

useCacheEntryPrunePrevention.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import useCache from "./useCache.mjs";
77
/** @typedef {import("./Cache.mjs").default} Cache */
88

99
/**
10-
* A React hook to prevent a {@link Cache.store cache store} entry from being
10+
* React hook to prevent a {@link Cache.store cache store} entry from being
1111
* pruned, by canceling the cache entry deletion for
1212
* {@link Cache#event:prune prune events} with `event.preventDefault()`.
1313
* @param {import("./Cache.mjs").CacheKey} cacheKey Cache key.

useForceUpdate.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import React from "react";
44

55
/**
6-
* A React hook to force the component to update and re-render on demand.
6+
* React hook to force the component to update and re-render on demand.
77
* @returns {() => void} Function that forces an update.
88
* @see [React hooks FAQ](https://reactjs.org/docs/hooks-faq.html#is-there-something-like-forceupdate).
99
* @see [Gotcha explanation](https://github.com/CharlesStover/use-force-update/issues/18#issuecomment-554486618).

0 commit comments

Comments
 (0)