Skip to content

Commit 3ccb56f

Browse files
committed
docs: fix errors in TSDocs
1 parent ac56327 commit 3ccb56f

File tree

8 files changed

+29
-32
lines changed

8 files changed

+29
-32
lines changed

docs/advanced/cluster.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ docker-compose down -v
5656
## How it works
5757

5858
The `docker-compose.yml` file configures a setup in which there are several
59-
services that make {@link "@lumieducation/h5p-server} work in cluster mode:
59+
services that make {@link "@lumieducation/h5p-server"} work in cluster mode:
6060

6161
- Minio (provides S3 storage backend for content, temporary and library files)
6262
- MongoDB (provides database backend for content and library metadata)

packages/h5p-mongos3/src/MongoLibraryStorage.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ export default class MongoLibraryStorage implements ILibraryStorage {
109109
* Adds the metadata of the library to the repository and assigns a new id
110110
* to the installed library. This id is used later when the library must be
111111
* referenced somewhere. Throws errors if something goes wrong.
112-
* @param libraryMetadata The library metadata object (= content of
112+
* @param libraryData The library metadata object (= content of
113113
* library.json)
114114
* @param restricted True if the library can only be used be users allowed
115115
* to install restricted libraries.
@@ -434,10 +434,10 @@ export default class MongoLibraryStorage implements ILibraryStorage {
434434
}
435435

436436
/**
437-
* Returns a information about a library file.
438-
* Throws an exception if the file does not exist.
437+
* Returns a information about a library file. Throws an exception if the
438+
* file does not exist.
439439
* @param library library
440-
* @param filename the relative path inside the library
440+
* @param file the relative path inside the library
441441
* @returns the file stats
442442
*/
443443
public async getFileStats(
@@ -495,7 +495,7 @@ export default class MongoLibraryStorage implements ILibraryStorage {
495495
* Returns a readable stream of a library file's contents.
496496
* Throws an exception if the file does not exist.
497497
* @param library library
498-
* @param filename the relative path inside the library
498+
* @param file the relative path inside the library
499499
* @returns a readable stream of the file's contents
500500
*/
501501
public async getFileStream(

packages/h5p-mongos3/src/MongoS3ContentStorage.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ export default class MongoS3ContentStorage implements IContentStorage {
343343
/**
344344
* Returns information about a content file (e.g. image or video) inside a
345345
* piece of content.
346-
* @param id the id of the content object that the file is attached to
346+
* @param contentId the id of the content object that the file is attached to
347347
* @param filename the filename of the file to get information about
348348
* @param user the user who wants to retrieve the content file
349349
* @returns

packages/h5p-mongos3/src/MongoS3LibraryStorage.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export default class MongoS3LibraryStorage implements ILibraryStorage {
8383
* up the partly installed library.
8484
* @param library The library that is being installed
8585
* @param filename Filename of the file to add, relative to the library root
86-
* @param stream The stream containing the file content
86+
* @param readStream The stream containing the file content
8787
* @returns true if successful
8888
*/
8989
public async addFile(
@@ -127,7 +127,7 @@ export default class MongoS3LibraryStorage implements ILibraryStorage {
127127
* Adds the metadata of the library to the repository and assigns a new id
128128
* to the installed library. This id is used later when the library must be
129129
* referenced somewhere. Throws errors if something goes wrong.
130-
* @param libraryMetadata The library metadata object (= content of
130+
* @param libraryData The library metadata object (= content of
131131
* library.json)
132132
* @param restricted True if the library can only be used be users allowed
133133
* to install restricted libraries.
@@ -441,7 +441,7 @@ export default class MongoS3LibraryStorage implements ILibraryStorage {
441441
* Returns a information about a library file.
442442
* Throws an exception if the file does not exist.
443443
* @param library library
444-
* @param filename the relative path inside the library
444+
* @param file the relative path inside the library
445445
* @returns the file stats
446446
*/
447447
public async getFileStats(
@@ -475,7 +475,7 @@ export default class MongoS3LibraryStorage implements ILibraryStorage {
475475
* Returns a readable stream of a library file's contents.
476476
* Throws an exception if the file does not exist.
477477
* @param library library
478-
* @param filename the relative path inside the library
478+
* @param file the relative path inside the library
479479
* @returns a readable stream of the file's contents
480480
*/
481481
public async getFileStream(
@@ -659,8 +659,8 @@ export default class MongoS3LibraryStorage implements ILibraryStorage {
659659
/**
660660
* Gets a list of all library files that exist for this library.
661661
* @param library the library name
662-
* @param withMetadata true if the 'library.json' file should be included in
663-
* the list
662+
* @param options set `withMetadata` to `true` if the `library.json` file
663+
* should be included in the list
664664
* @returns all files that exist for the library
665665
*/
666666
public async listFiles(

packages/h5p-mongos3/src/S3TemporaryFileStorage.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ export default class S3TemporaryFileStorage implements ITemporaryFileStorage {
7777
* Deletes the file from temporary storage.
7878
* Throws errors of something goes wrong.
7979
* @param filename the file to delete
80-
* @param userId the user ID of the user who wants to delete the file
80+
* @param _ownerId the user ID of the user who wants to delete the file
8181
*/
8282
public async deleteFile(filename: string, _ownerId: string): Promise<void> {
8383
log.debug(`Deleting file "${filename}" from temporary storage.`);
@@ -108,7 +108,7 @@ export default class S3TemporaryFileStorage implements ITemporaryFileStorage {
108108
/**
109109
* Checks if a file exists in temporary storage.
110110
* @param filename the file to check
111-
* @param user the user who wants to access the file
111+
* @param _user the user who wants to access the file
112112
*/
113113
public async fileExists(filename: string, _user: IUser): Promise<boolean> {
114114
log.debug(`Checking if file ${filename} exists in temporary storage.`);
@@ -144,7 +144,7 @@ export default class S3TemporaryFileStorage implements ITemporaryFileStorage {
144144
* Returns a information about a temporary file.
145145
* Throws an exception if the file does not exist.
146146
* @param filename the relative path inside the library
147-
* @param user the user who wants to access the file
147+
* @param _user the user who wants to access the file
148148
* @returns the file stats
149149
*/
150150
public async getFileStats(

packages/h5p-mongos3/src/initMongo.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ import { Logger } from '@lumieducation/h5p-server';
55
const log = new Logger('initMongo');
66

77
/**
8-
* Creates a MongoDB client.
9-
* You must either pass the configuration values through the parameters or set
10-
* them as environment variables.
11-
* @param url (optional) the connection URL for MongoDB (e.g. mongodb://localhost:27105)
12-
* Can also be set through the environment variable MONGODB_URL.
13-
* @param db (optional) the DB
14-
* Can also be set through the environment variable MONGODB_DB.
15-
* @param user (optional) a MongoDB user that can read and write the database
16-
* Can also be set through the environment variable MONGODB_USER.
17-
* @param password (optional) the password for the MongoDB user
18-
* Can also be set through the environment variable MONGODB_PASSWORD.
8+
* Creates a MongoDB client. You must either pass the configuration values
9+
* through the parameters or set them as environment variables.
10+
* @param url (optional) the connection URL for MongoDB (e.g.
11+
* mongodb://localhost:27105) Can also be set through the environment variable
12+
* MONGODB_URL.
13+
* @param db (optional) the DB Can also be set through the environment variable
14+
* MONGODB_DB.
15+
* @param username (optional) a MongoDB user that can read and write the
16+
* database Can also be set through the environment variable MONGODB_USER.
17+
* @param password (optional) the password for the MongoDB user Can also be set
18+
* through the environment variable MONGODB_PASSWORD.
1919
* @returns the MongoDB client
2020
*/
2121
export default async (

packages/h5p-server/src/ContentFileScanner.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ export class ContentFileScanner extends ContentScanner {
6666
* Loads the specified content from the ContentManager and scans its
6767
* parameters (= content.json) for references to local files (= audio,
6868
* video, images, generic files).
69-
* @param contentId the content to scan
70-
* @param user the user who wants to access the file
69+
* @param mainParams the parameters of the content to scan
70+
* @param mainLibraryName the library name of the content in the parameters
7171
* @returns a list of local files
7272
*/
7373
public async scanForFiles(

packages/h5p-server/src/helpers/AggregateH5pError.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@ import H5pError from './H5pError';
55
* the execution has to be stopped stopped right away.
66
*/
77
export default class AggregateH5pError extends H5pError {
8-
/**
9-
* @param firstError (optional) the first error
10-
*/
118
constructor(
129
errorId: string,
1310
replacements: { [key: string]: string },

0 commit comments

Comments
 (0)