Skip to content

Commit 8e05c36

Browse files
committed
docs: corrected inline typedocs
1 parent 3ccb56f commit 8e05c36

File tree

9 files changed

+35
-33
lines changed

9 files changed

+35
-33
lines changed

packages/h5p-express/src/index.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ import contentUserDataExpressRouter from './ContentUserDataRouter/ContentUserDat
99
import contentTypeCacheExpressRouter from './ContentTypeCacheRouter/ContentTypeCacheExpressRouter';
1010
import finishedDataExpressRouter from './FinishedDataRouter/FinishedDataExpressRouter';
1111

12+
import type H5PAjaxExpressRouterOptions from './H5PAjaxRouter/H5PAjaxExpressRouterOptions';
13+
import type LibraryAdministrationExpressRouterOptions from './LibraryAdministrationRouter/LibraryAdministrationExpressRouterOptions';
14+
1215
export {
16+
H5PAjaxExpressRouterOptions,
17+
LibraryAdministrationExpressRouterOptions,
1318
IRequestWithLanguage,
1419
IRequestWithUser,
1520
IActionRequest,

packages/h5p-react/src/H5PEditorUI.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ declare global {
2525
}
2626
}
2727

28-
interface IH5PEditorUIProps {
28+
export interface IH5PEditorUIProps {
2929
contentId: string;
3030
loadContentCallback: (contentId: string) => Promise<
3131
IEditorModel & {

packages/h5p-react/src/H5PPlayerUI.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ declare global {
2828
}
2929
}
3030

31-
interface IH5PPlayerUIProps {
31+
export interface IH5PPlayerUIProps {
3232
contentId: string;
3333
contextId?: string;
3434
asUserId?: string;

packages/h5p-react/src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import H5PPlayerUI from './H5PPlayerUI';
2-
import H5PEditorUI from './H5PEditorUI';
1+
import H5PPlayerUI, { type IH5PPlayerUIProps } from './H5PPlayerUI';
2+
import H5PEditorUI, { type IH5PEditorUIProps } from './H5PEditorUI';
33

4-
export { H5PPlayerUI, H5PEditorUI };
4+
export { H5PPlayerUI, H5PEditorUI, IH5PPlayerUIProps, IH5PEditorUIProps };

packages/h5p-server/src/H5PEditor.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -977,8 +977,7 @@ export default class H5PEditor {
977977
* of the file in the local filesystem
978978
* @param user the user who is uploading the package; optional if
979979
* onlyInstallLibraries is set to true
980-
* @param options (optional) further options:
981-
* @param onlyInstallLibraries true if content should be disregarded
980+
* @param options.onlyInstallLibraries true if content should be disregarded
982981
* @returns the content information extracted from the package. The metadata
983982
* and parameters property will be undefined if onlyInstallLibraries was set
984983
* to true.

packages/h5p-server/src/H5PPlayer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export default class H5PPlayer {
126126
* want to use the IContentStorage object passed into the constructor.
127127
* @param contentId the content id
128128
* @param actingUser the user who wants to access the content
129-
* @param options.ignoreUserPermission (optional) If set to true, the user
129+
* @param options.ignoreUserPermissions (optional) If set to true, the user
130130
* object won't be passed to the storage classes for permission checks. You
131131
* can use this option if you have already checked the user's permission in
132132
* a different layer.

packages/h5p-server/src/LibraryManager.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ export default class LibraryManager {
5252
* @param translationFunction (optional) The translation function to use if
5353
* you want to localize library metadata (titles). If undefined, no
5454
* localization will be performed.
55-
* @param lock (optional) an implementation of a locking mechanism that
56-
* prevents race conditions. If this is left undefined a simple
55+
* @param lockProvider (optional) an implementation of a locking mechanism
56+
* that prevents race conditions. If this is left undefined a simple
5757
* single-process lock mechanism will be used. If the library is used within
5858
* a multi-process or cluster setup, it is necessary to pass in a
5959
* distributed locking implementation.
@@ -108,7 +108,7 @@ export default class LibraryManager {
108108
* Returns a readable stream of a library file's contents.
109109
* Throws an exception if the file does not exist.
110110
* @param library library
111-
* @param filename the relative path inside the library
111+
* @param file the relative path inside the library
112112
* @returns a readable stream of the file's contents
113113
*/
114114
public async getFileStats(
@@ -127,7 +127,7 @@ export default class LibraryManager {
127127
* Returns a readable stream of a library file's contents.
128128
* Throws an exception if the file does not exist.
129129
* @param library library
130-
* @param filename the relative path inside the library
130+
* @param file the relative path inside the library
131131
* @returns a readable stream of the file's contents
132132
*/
133133
public async getFileStream(

packages/h5p-server/src/LibraryName.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,13 @@ export default class LibraryName implements ILibraryName {
3737
}
3838

3939
/**
40-
* Creates a library object from a library name. Also validates the ubername
41-
* to protect against attempts to manipulate the server by creating library
42-
* names.
40+
* Parses the ubername (e.g. "H5P.Example-1.0") and returns a library name
41+
* object.
4342
* @param ubername The library name in a format "H5P.Example-1.0" or
4443
* "H5P.Example 1.0" (see options)
45-
* @param restricted true if the library is restricted
46-
* @param useWhitespace true if the parser should accept names like
44+
* @param options.useWhitespace true if the parser should accept names like
4745
* "H5P.Library 1.0"
48-
* @param useHyphen true if the parser should accept names like
46+
* @param options.useHyphen true if the parser should accept names like
4947
* "H5P.Library-1.0"
5048
* @returns undefined if the name could not be parsed
5149
* @throws H5pError with 400 when the ubername is invalid

packages/h5p-server/src/types.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -662,8 +662,7 @@ export interface IFinishedUserData {
662662
export interface IContentUserDataStorage {
663663
/**
664664
* Creates or updates the content user data.
665-
* @param contextId an arbitrary value that can be used to save multiple
666-
* states for one content - user tuple
665+
* @param userData user data
667666
*/
668667
createOrUpdateContentUserData(userData: IContentUserData): Promise<void>;
669668

@@ -694,7 +693,7 @@ export interface IContentUserDataStorage {
694693
* @param contentId The id of the content to load user data from
695694
* @param dataType Used by the h5p.js client
696695
* @param subContentId The id provided by the h5p.js client call
697-
* @param user The user who owns this object
696+
* @param userId The user who owns this object
698697
* @param contextId an arbitrary value that can be used to save multiple
699698
* states for one content - user tuple
700699
* @returns the data
@@ -710,7 +709,7 @@ export interface IContentUserDataStorage {
710709
/**
711710
* Lists all associated contentUserData for a given contentId and user.
712711
* @param contentId The id of the content to load user data from
713-
* @param user The id of the user to load user data from
712+
* @param userId The id of the user to load user data from
714713
* @param contextId an arbitrary value that can be used to save multiple
715714
* states for one content - user tuple
716715
* @returns An array of objects containing the dataType, subContentId and
@@ -812,7 +811,7 @@ export interface IContentStorage {
812811
/**
813812
* Deletes a content object and all its dependent files from the repository.
814813
* Throws errors if something goes wrong.
815-
* @param id The content id to delete.
814+
* @param contentId The content id to delete.
816815
* @param user The user who wants to delete the content
817816
*/
818817
deleteContent(contentId: ContentId, user?: IUser): Promise<void>;
@@ -841,8 +840,8 @@ export interface IContentStorage {
841840
/**
842841
* Returns information about a content file (e.g. image or video) inside a
843842
* piece of content.
844-
* @param id the id of the content object that the file is attached to
845-
* @param filename the filename of the file to get information about
843+
* @param contentId the id of the content object that the file is attached to
844+
* @param file the filename of the file to get information about
846845
* @param user the user who wants to retrieve the content file
847846
* @returns
848847
*/
@@ -855,8 +854,9 @@ export interface IContentStorage {
855854
/**
856855
* Returns a readable stream of a content file (e.g. image or video) inside
857856
* a piece of content
858-
* @param id the id of the content object that the file is attached to
859-
* @param filename the filename of the file to get; can be a path including
857+
* @param contentId the id of the content object that the file is attached
858+
* to
859+
* @param file the filename of the file to get; can be a path including
860860
* subdirectories (e.g. 'images/xyz.png')
861861
* @param user the user who wants to retrieve the content file
862862
* @param rangeStart (optional) the position in bytes at which the stream
@@ -952,7 +952,7 @@ export interface ILibraryStorage {
952952
* clean up the partly installed library.
953953
* @param library The library that is being installed
954954
* @param filename Filename of the file to add, relative to the library root
955-
* @param stream The stream containing the file content
955+
* @param readStream The stream containing the file content
956956
* @returns true if successful
957957
*/
958958
addFile(
@@ -965,7 +965,7 @@ export interface ILibraryStorage {
965965
* Adds the metadata of the library to the repository and assigns a new id
966966
* to the installed library. This dea is used later when the library must be
967967
* referenced somewhere. Throws errors if something goes wrong.
968-
* @param libraryMetadata The library metadata object (= content of
968+
* @param libraryData The library metadata object (= content of
969969
* library.json)
970970
* @param restricted True if the library can only be used be users allowed
971971
* to install restricted libraries.
@@ -1035,7 +1035,7 @@ export interface ILibraryStorage {
10351035
* Returns a information about a library file.
10361036
* Throws an exception if the file does not exist.
10371037
* @param library library
1038-
* @param filename the relative path inside the library
1038+
* @param file the relative path inside the library
10391039
* @returns the file stats
10401040
*/
10411041
getFileStats(library: ILibraryName, file: string): Promise<IFileStats>;
@@ -1044,7 +1044,7 @@ export interface ILibraryStorage {
10441044
* Returns a readable stream of a library file's contents.
10451045
* Throws an exception if the file does not exist.
10461046
* @param library library
1047-
* @param filename the relative path inside the library
1047+
* @param file the relative path inside the library
10481048
* @returns a readable stream of the file's contents
10491049
*/
10501050
getFileStream(library: ILibraryName, file: string): Promise<Readable>;
@@ -2451,8 +2451,8 @@ export interface ILockProvider {
24512451
*
24522452
* @param key the key of the resource to lock
24532453
* @param callback the code which should run once the lock was acquired
2454-
* @param timeout how long to wait until the lock is acquired
2455-
* @param maxOccupationTime how long to wait until the code in callback is
2454+
* @param options.timeout how long to wait until the lock is acquired
2455+
* @param options.maxOccupationTime how long to wait until the code in callback is
24562456
* finished
24572457
* @throws 'timeout' or 'occupation-time-exceed' errors
24582458
*/

0 commit comments

Comments
 (0)