docs: Fix language

Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
This commit is contained in:
Joachim Van Herwegen 2024-04-02 09:06:58 +02:00
parent cac70b1f88
commit 486241f3d4
19 changed files with 27 additions and 27 deletions

View File

@ -260,7 +260,7 @@ export class IdentityProviderFactory implements ProviderFactory {
}
/**
* Checks if the given token is an access token.
* Checks whether the given token is an access token.
* The AccessToken interface is not exported, so we have to access it like this.
*/
private isAccessToken(token: unknown): token is KoaContextWithOIDC['oidc']['accessToken'] {

View File

@ -9,8 +9,8 @@ import Dict = NodeJS.Dict;
type BaseObjectSchema = ObjectSchema<Maybe<AnyObject>>;
// The builtin `url` validator of `yup` does not support localhost URLs, so we create a custom one here.
// The reason for having a URL validator on the WebID is to prevent us from generating invalid ACL,
// which would break the pod creation causing us to have an incomplete pod.
// We validate the WebID URL to prevent generation of invalid ACL,
// which would break the pod creation, causing us to have an incomplete pod.
export const URL_SCHEMA = string().trim().optional().test({
name: 'url',
message: (value: { value: string }): string => `"${value.value}" is not a valid URL`,

View File

@ -81,7 +81,7 @@ export abstract class ResolveLoginHandler extends JsonInteractionHandler {
}
/**
* Updates the account setting that determines if the login status needs to be remembered.
* Updates the account setting that determines whether the login status needs to be remembered.
*
* @param accountId - ID of the account.
* @param remember - If the account should be remembered or not. The setting will not be updated if this is undefined.

View File

@ -226,7 +226,7 @@ export class AppRunner {
return import(cssConfigPathJs) as Promise<Record<string, unknown>>;
}
// Finally try and read from the config.community-solid-server
// Finally try to read from the config.community-solid-server
// field in the root package.json
const pkg = await readJSON(packageJsonPath) as { config?: Record<string, unknown> };
if (typeof pkg.config?.['community-solid-server'] === 'object') {

View File

@ -6,7 +6,7 @@ export interface ComponentsJsFactory {
* Instantiates a new object using Components.js.
*
* @param configPath - Location of the config to instantiate.
* @param componentIri - Iri of the object in the config that will be the result.
* @param componentIri - IRI of the object in the config that will be the result.
* @param variables - Variables to send to Components.js
*
* @returns The resulting object, corresponding to the given component IRI.

View File

@ -374,7 +374,7 @@ export class DataAccessorBasedStore implements ResourceStore {
* then the other URI MUST NOT correspond to another resource."
* https://solid.github.io/specification/protocol#uri-slash-semantics
*
* First the identifier gets requested and if no result is found
* First the identifier gets requested. If no result is found,
* the identifier with differing trailing slash is requested.
*
* @param identifier - Identifier that needs to be checked.
@ -452,7 +452,7 @@ export class DataAccessorBasedStore implements ResourceStore {
/**
* Write the given resource to the DataAccessor. Metadata will be updated with necessary triples.
* In case of containers `handleContainerData` will be used to verify the data.
* For containers, `handleContainerData` will be used to verify the data.
*
* @param identifier - Identifier of the resource.
* @param representation - Corresponding Representation.
@ -590,8 +590,8 @@ export class DataAccessorBasedStore implements ResourceStore {
}
/**
* Clean http Slug to be compatible with the server. Makes sure there are no unwanted characters
* e.g.: cleanslug('&%26') returns '%26%26'
* Clean http Slug to be compatible with the server. Makes sure there are no unwanted characters,
* e.g., cleanslug('&%26') returns '%26%26'
*
* @param slug - the slug to clean
*/
@ -636,7 +636,7 @@ export class DataAccessorBasedStore implements ResourceStore {
}
/**
* Checks if the given metadata represents a (potential) container,
* Checks whether the given metadata represents a (potential) container,
* based on the metadata.
*
* @param metadata - Metadata of the (new) resource.

View File

@ -5,7 +5,7 @@ import type { ResourceIdentifier } from '../http/representation/ResourceIdentifi
*/
export interface ResourceSet {
/**
* Check if a resource exists in this ResourceSet.
* Checks whether a resource exists in this ResourceSet.
*
* @param identifier - Identifier of resource to check.
*

View File

@ -162,7 +162,7 @@ export function matchesMediaPreferences(type: string, preferred?: ValuePreferenc
}
/**
* Checks if the given two media types/ranges match each other.
* Checks whether the given two media types/ranges match each other.
* Takes wildcards into account.
*
* @param mediaA - Media type to match.

View File

@ -12,7 +12,7 @@ export interface KeyValueStorage<TKey, TValue> {
get: (key: TKey) => Promise<TValue | undefined>;
/**
* Checks if there is a value stored for the given key.
* Checks whether there is a value stored for the given key.
*
* @param identifier - Identifier to check.
*/

View File

@ -201,7 +201,7 @@ export class BaseFileIdentifierMapper implements FileIdentifierMapper {
}
/**
* Check if the given relative path is valid.
* Check whether the given relative path is valid.
*
* @param path - A relative path, as generated by {@link getRelativePath}.
* @param identifier - A resource identifier.

View File

@ -34,9 +34,9 @@ export interface FileIdentifierMapper {
mapFilePathToUrl: (filePath: string, isContainer: boolean) => Promise<ResourceLink>;
/**
* Maps the given resource identifier / URL to a file path.
* Determines the content-type if no content-type was provided by finding the corresponding file.
* If there is no corresponding file a file path will be generated.
* For containers the content-type input gets ignored.
* Determines the content-type, if no content-type was provided, by finding the corresponding file.
* If there is no corresponding file, a file path will be generated.
* For containers, the content-type input gets ignored.
*
* @param identifier - The input identifier.
* @param isMetadata - If we are mapping the metadata of the resource instead of its data.

View File

@ -503,7 +503,7 @@ export function matchesAuthorizationScheme(scheme: string, authorization?: strin
* Checks if the scheme part of the specified url matches at least one of the provided options.
*
* @param url - A string representing the URL.
* @param schemes - Scheme value options (the function will check if at least one matches the URL scheme).
* @param schemes - Scheme value options (the function will check whether at least one matches the URL scheme).
*
* @returns True if the URL scheme matches at least one of the provided options, false otherwise.
*/

View File

@ -203,7 +203,7 @@ export function encodeUriPathComponents(path: string): string {
}
/**
* Checks if the path corresponds to a container path (ending in a /).
* Checks whether the path corresponds to a container path (ending in a /).
*
* @param path - Path to check.
*/
@ -214,7 +214,7 @@ export function isContainerPath(path: string): boolean {
}
/**
* Checks if the identifier corresponds to a container identifier.
* Checks whether the identifier corresponds to a container identifier.
*
* @param identifier - Identifier to check.
*/

View File

@ -80,7 +80,7 @@ const safeErrors = new Set([
/**
* Pipes one stream into another and emits errors of the first stream with the second.
* In case of an error in the first stream the second one will be destroyed with the given error.
* If the first stream errors, the second one will be destroyed with the given error.
* This will also make the stream {@link Guarded}.
*
* @param readable - Initial readable stream.

View File

@ -32,7 +32,7 @@ export function isValidFileName(name: string): boolean {
}
/**
* Checks if the given string is a valid URL.
* Checks whether the given string is a valid URL.
*
* @param url - String to check.
*

View File

@ -76,7 +76,7 @@ export interface HttpErrorClass<TCode extends number = number> {
*/
readonly uri: NamedNode;
/**
* Checks if the given error is an instance of this class.
* Checks whether the given error is an instance of this class.
*/
readonly isInstance: (error: unknown) => error is HttpError<TCode>;
}

View File

@ -7,7 +7,7 @@ export type AsyncHandlerOutput<T extends AsyncHandler<unknown, unknown>> = Await
*/
export abstract class AsyncHandler<TIn = void, TOut = void> {
/**
* Checks if the input can be handled by this class.
* Checks whether the input can be handled by this class.
* If it cannot handle the input, rejects with an error explaining why.
*
* @param input - Input that could potentially be handled.

View File

@ -24,7 +24,7 @@ export class WaterfallHandler<TIn, TOut> implements AsyncHandler<TIn, TOut> {
}
/**
* Checks if any of the stored handlers can handle the given input.
* Checks whether any of the stored handlers can handle the given input.
*
* @param input - The data that would need to be handled.
*

View File

@ -17,7 +17,7 @@ export interface ResourceLocker {
/**
* Releases a lock on the requested identifier.
* The promise will resolve when the lock has been released.
* In case there is no lock on the resource an error should be thrown.
* If there is no lock on the resource, an error should be thrown.
*
* @param identifier - Resource to release the lock on.
*/