refactor: Enable jsdoc/tag-lines and jsdoc/sort-tags rules

This commit is contained in:
Joachim Van Herwegen
2024-03-14 09:29:56 +01:00
parent 3e59aa4b55
commit 65bf2bd34e
89 changed files with 276 additions and 18 deletions

View File

@@ -39,6 +39,7 @@ export class StaticAssetHandler extends HttpHandler {
/**
* Creates a handler for the provided static resources.
*
* @param assets - A list of {@link StaticAssetEntry}.
* @param baseUrl - The base URL of the server.
* @param options - Specific options.

View File

@@ -11,6 +11,7 @@ export interface NotificationChannelStorage {
/**
* Returns the requested channel.
* `undefined` if no match was found or if the notification channel expired.
*
* @param id - The identifier of the notification channel.
*/
get: (id: string) => Promise<NotificationChannel | undefined>;
@@ -18,12 +19,14 @@ export interface NotificationChannelStorage {
/**
* Returns the identifiers of all notification channel entries that have the given identifier as their topic.
* The identifiers can potentially correspond to expired channels.
*
* @param topic - The identifier that is the topic.
*/
getAll: (topic: ResourceIdentifier) => Promise<string[]>;
/**
* Adds the given channel to the storage.
*
* @param channel - Channel to add.
*/
add: (channel: NotificationChannel) => Promise<void>;
@@ -31,6 +34,7 @@ export interface NotificationChannelStorage {
/**
* Updates the given notification channel.
* The `id` and the `topic` can not be updated.
*
* @param channel - The channel to update.
*/
update: (channel: NotificationChannel) => Promise<void>;
@@ -38,6 +42,7 @@ export interface NotificationChannelStorage {
/**
* Deletes the given notification channel from the storage.
* Returns true if the channel existed.
*
* @param id - The identifier of the notification channel
*/
delete: (id: string) => Promise<boolean>;

View File

@@ -31,6 +31,7 @@ export interface NotificationChannelType {
/**
* Validate and convert the input quads into a {@link NotificationChannel}.
*
* @param data - The input quads.
* @param credentials - The credentials of the agent doing the request.
*/
@@ -38,12 +39,14 @@ export interface NotificationChannelType {
/**
* Converts a {@link NotificationChannel} to a serialized JSON-LD representation.
*
* @param channel - The notification channel to serialize.
*/
toJsonLd: (channel: NotificationChannel) => Promise<Record<string, unknown>>;
/**
* Determines which modes are required to allow the given notification channel.
*
* @param channel - The notification channel to verify.
*
* @returns The required modes.
@@ -53,6 +56,7 @@ export interface NotificationChannelType {
/**
* This function will be called after the serialized channel is sent back as a response,
* allowing for any final actions that need to happen.
*
* @param channel - The notification channel that is completed.
*/
completeChannel: (channel: NotificationChannel) => Promise<void>;

View File

@@ -3,6 +3,7 @@ import { BadRequestHttpError } from '../../../util/errors/BadRequestHttpError';
/**
* Generates a WebSocket URL by converting an HTTP(S) URL into a WS(S) URL.
*
* @param id - The identifier of the channel. Needs to be a URL.
*/
export function generateWebSocketUrl(id: string): string {

View File

@@ -37,6 +37,7 @@ export class RedirectingHttpHandler extends HttpHandler {
/**
* Creates a handler for the provided redirects.
*
* @param redirects - A mapping between URL patterns.
* @param baseUrl - Base URL of the server.
* @param targetExtractor - To extract the target from the request.