Skip to content

Commit 4dd3eb9

Browse files
author
David Joy
committed
docs: using jsdoc module syntax correctly
1 parent 3f1192a commit 4dd3eb9

File tree

4 files changed

+19
-20
lines changed

4 files changed

+19
-20
lines changed

src/config.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ let config = {
4040
* reference to an existing object, and is thus safe to call as often as desired. The document
4141
* should have the following keys at a minimum:
4242
*
43-
* @memberof Config
43+
* @memberof module:Config
4444
* @returns {ConfigDocument}
4545
*/
4646
export function getConfig() {
@@ -53,7 +53,7 @@ export function getConfig() {
5353
* The supplied config document will be tested with `ensureDefinedConfig` to ensure it does not
5454
* have any `undefined` keys.
5555
*
56-
* @memberof Config
56+
* @memberof module:Config
5757
* @param {ConfigDocument} newConfig
5858
*/
5959
export function setConfig(newConfig) {
@@ -74,7 +74,7 @@ export function setConfig(newConfig) {
7474
*
7575
* If any of the key values are `undefined`, an error will be thrown.
7676
*
77-
* @memberof Config
77+
* @memberof module:Config
7878
* @param {Object} newConfig
7979
*/
8080
export function mergeConfig(newConfig) {
@@ -104,7 +104,7 @@ export function mergeConfig(newConfig) {
104104
* phase handlers responsible for loading additional configuration data in the initialization
105105
* sequence.
106106
*
107-
* @memberof Config
107+
* @memberof module:Config
108108
* @param {Array} keys
109109
* @param {string} [requester='unspecified application code']
110110
*/
@@ -152,5 +152,5 @@ export function ensureConfig(keys, requester = 'unspecified application code') {
152152
* @property {string} SEGMENT_KEY
153153
* @property {string} SITE_NAME
154154
* @property {string} USER_INFO_COOKIE_NAME
155-
* @memberof Config
155+
* @memberof module:Config
156156
*/

src/initialize.js

+5-6
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,12 @@ export const APP_INIT_ERROR = `${APP_TOPIC}.INIT_ERROR`;
3232
* package. Applications are encouraged to use this history object, rather than creating their own,
3333
* as behavior may be undefined when managing history via multiple mechanisms/instances.
3434
*
35-
* @memberof Utilities
35+
* @memberof module:Utilities
3636
*/
3737
export const history = createBrowserHistory();
3838

3939
/**
40-
* @memberof Initialization
41-
* @exports
40+
* @memberof module:Initialization
4241
* @param {*} error
4342
*/
4443
export async function initError(error) {
@@ -54,7 +53,7 @@ export async function initError(error) {
5453
* - Optionally loading additional user information via the application's user account data
5554
* endpoint.
5655
*
57-
* @memberof Initialization
56+
* @memberof module:Initialization
5857
* @param {boolean} requireUser Whether or not we should redirect to login if a user is not
5958
* authenticated.
6059
* @param {boolean} hydrateUser Whether or not we should fetch additional user account data.
@@ -82,7 +81,7 @@ export async function auth(requireUser, hydrateUser) {
8281
* service. This is a pre-requisite for sending analytics events, thus, we do it during the
8382
* initialization sequence so that analytics is ready once the application's UI code starts to load.
8483
*
85-
* @memberof Initialization
84+
* @memberof module:Initialization
8685
*/
8786
export async function analytics() {
8887
const authenticatedUser = getAuthenticatedUser();
@@ -112,7 +111,7 @@ function applyOverrideHandlers(overrides) {
112111
* Invokes the application initialization sequence.
113112
*
114113
*
115-
* @memberof Initialization
114+
* @memberof module:Initialization
116115
* @param {Object} [options]
117116
* @param {*} [options.loggingService=NewRelicLoggingService] The `LoggingService` implementation
118117
* to use.

src/pubSub.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import PubSub from 'pubsub-js';
2020

2121
/**
2222
*
23-
* @memberof PubSub
23+
* @memberof module:PubSub
2424
* @param {string} type
2525
* @param {function} callback
2626
* @returns {string} A subscription token that can be passed to `unsubscribe`
@@ -31,7 +31,7 @@ export function subscribe(type, callback) {
3131

3232
/**
3333
*
34-
* @memberof PubSub
34+
* @memberof module:PubSub
3535
* @param {string} token A subscription token provided by `subscribe`
3636
*/
3737
export function unsubscribe(token) {
@@ -40,7 +40,7 @@ export function unsubscribe(token) {
4040

4141
/**
4242
*
43-
* @memberof PubSub
43+
* @memberof module:PubSub
4444
* @param {string} type
4545
* @param {Object} data
4646
*/

src/utils.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ import snakeCase from 'lodash.snakecase';
3131
* Can accept arrays as well as objects, and will perform its conversion on any objects it finds in
3232
* the array.
3333
*
34-
* @memberof Utilities
34+
* @memberof module:Utilities
3535
* @param {Object} object
3636
* @param {function} modify
3737
* @returns {Object}
@@ -67,7 +67,7 @@ export function modifyObjectKeys(object, modify) {
6767
* Can accept arrays as well as objects, and will perform its conversion on any objects it finds in
6868
* the array.
6969
*
70-
* @memberof Utilities
70+
* @memberof module:Utilities
7171
* @param {Array|Object} object
7272
* @returns {Array|Object}
7373
*/
@@ -84,7 +84,7 @@ export function camelCaseObject(object) {
8484
* Can accept arrays as well as objects, and will perform its conversion on any objects it finds in
8585
* the array.
8686
*
87-
* @memberof Utilities
87+
* @memberof module:Utilities
8888
* @param {Array|Object} object
8989
* @returns {Array|Object}
9090
*/
@@ -114,7 +114,7 @@ export function snakeCaseObject(object) {
114114
* Can accept arrays as well as objects, and will perform its conversion on any objects it finds in
115115
* the array.
116116
*
117-
* @memberof Utilities
117+
* @memberof module:Utilities
118118
* @param {Array|Object} object
119119
* @param {Object} nameMap
120120
* @returns {Array|Object}
@@ -132,7 +132,7 @@ export function convertKeyNames(object, nameMap) {
132132
* [window.searchParams](https://developer.mozilla.org/en-US/docs/Web/API/URL/searchParams)
133133
*
134134
* @deprecated
135-
* @memberof Utilities
135+
* @memberof module:Utilities
136136
* @param {string} [search=global.location.search]
137137
* @returns {Object}
138138
*/
@@ -158,7 +158,7 @@ export function getQueryParameters(search = global.location.search) {
158158
*
159159
* Keys that are intended to be falsy should be defined using null, 0, false, etc.
160160
*
161-
* @memberof Utilities
161+
* @memberof module:Utilities
162162
* @param {Object} object
163163
* @param {string} requester A human-readable identifier for the code which called this function.
164164
* Used when throwing errors to aid in debugging.

0 commit comments

Comments
 (0)