-
-
Notifications
You must be signed in to change notification settings - Fork 89
Fix several JSDoc typos and incorrect references #539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
45ca7f9
d9604ab
a4fbc89
5ec53e7
a8bb572
9af59a9
648d742
ee594f3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,14 +21,14 @@ export function convertUrlIfHandle(handleOrUrl: string): URL { | |
|
|
||
| /** | ||
| * Converts a handle in the format `@username@domain` to a URL. | ||
| * The resulting URL will be in the format `https://domain/@username`. | ||
| * The resulting URL will be in the format `acct:username@domain`. | ||
| * @param handle The handle to convert, in the format `@username@domain`. | ||
| * @returns A URL object representing the handle. | ||
| * @throws {Error} If the handle format is invalid. | ||
| * @example | ||
| * ```ts | ||
| * const url = convertHandleToUrl("@[email protected]"); | ||
| * console.log(url.toString()); // "https://domain.com/@username" | ||
| * console.log(url.toString()); // "acct:username@domain.com" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The example in the JSDoc for |
||
| * ``` | ||
| */ | ||
| export function convertHandleToUrl(handle: string): URL { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -38,7 +38,7 @@ export class DenoKvStore implements KvStore { | |
| } | ||
|
|
||
| /** | ||
| * {@inheritDoc KvStore.set} | ||
| * {@inheritDoc KvStore.get} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| */ | ||
| async get<T = unknown>(key: KvKey): Promise<T | undefined> { | ||
| const entry = await this.#kv.get<T>(key); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -116,7 +116,7 @@ export interface Context<TContextData> { | |
| * @param cls The class of the object. | ||
| * @param values The values to pass to the object dispatcher. | ||
| * @returns The object's URI. | ||
| * @throws {RouteError} If no object dispatcher is available for the class. | ||
| * @throws {RouterError} If no object dispatcher is available for the class. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| * @throws {TypeError} If values are invalid. | ||
| * @since 0.7.0 | ||
| */ | ||
|
|
@@ -383,7 +383,7 @@ export interface Context<TContextData> { | |
| ): Promise<void>; | ||
|
|
||
| /** | ||
| * Sends an activity to the outboxes of the sender's followers. | ||
| * Sends an activity to the inboxes of the sender's followers. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| * @param sender The sender's identifier or the sender's username. | ||
| * @param recipients In this case, it must be `"followers"`. | ||
| * @param activity The activity to send. | ||
|
|
@@ -429,7 +429,7 @@ export interface Context<TContextData> { | |
| * @param name The name of the collection, which can be a string or a symbol. | ||
| * @param values The values of the URI parameters. | ||
| * @return The URI of the collection. | ||
| * @throws {RouteError} If no object dispatcher is available for the name. | ||
| * @throws {RouterError} If no object dispatcher is available for the name. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| * @throws {TypeError} If values are invalid. | ||
| * @since 1.8.0 | ||
| */ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -468,7 +468,7 @@ export interface Federatable<TContextData> { | |
| * ([RFC 6570](https://tools.ietf.org/html/rfc6570)). | ||
| * The path must have no variables. | ||
| * @returns An object to register inbox listeners. | ||
| * @throws {RouteError} Thrown if the path pattern is invalid. | ||
| * @throws {RouterError} Thrown if the path pattern is invalid. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| */ | ||
| setInboxListeners( | ||
| inboxPath: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,7 +50,7 @@ export function createContext<TContextData>( | |
| sendActivity, | ||
| routeActivity, | ||
| } = values; | ||
| function throwRouteError(): URL { | ||
| function throwRouterError(): URL { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| throw new RouterError("Not implemented"); | ||
| } | ||
| return { | ||
|
|
@@ -64,17 +64,17 @@ export function createContext<TContextData>( | |
| contextLoader: contextLoader ?? mockDocumentLoader, | ||
| tracerProvider: tracerProvider ?? trace.getTracerProvider(), | ||
| clone: clone ?? ((data) => createContext({ ...values, data })), | ||
| getNodeInfoUri: getNodeInfoUri ?? throwRouteError, | ||
| getActorUri: getActorUri ?? throwRouteError, | ||
| getObjectUri: getObjectUri ?? throwRouteError, | ||
| getCollectionUri: getCollectionUri ?? throwRouteError, | ||
| getOutboxUri: getOutboxUri ?? throwRouteError, | ||
| getInboxUri: getInboxUri ?? throwRouteError, | ||
| getFollowingUri: getFollowingUri ?? throwRouteError, | ||
| getFollowersUri: getFollowersUri ?? throwRouteError, | ||
| getLikedUri: getLikedUri ?? throwRouteError, | ||
| getFeaturedUri: getFeaturedUri ?? throwRouteError, | ||
| getFeaturedTagsUri: getFeaturedTagsUri ?? throwRouteError, | ||
| getNodeInfoUri: getNodeInfoUri ?? throwRouterError, | ||
| getActorUri: getActorUri ?? throwRouterError, | ||
| getObjectUri: getObjectUri ?? throwRouterError, | ||
| getCollectionUri: getCollectionUri ?? throwRouterError, | ||
| getOutboxUri: getOutboxUri ?? throwRouterError, | ||
| getInboxUri: getInboxUri ?? throwRouterError, | ||
| getFollowingUri: getFollowingUri ?? throwRouterError, | ||
| getFollowersUri: getFollowersUri ?? throwRouterError, | ||
| getLikedUri: getLikedUri ?? throwRouterError, | ||
| getFeaturedUri: getFeaturedUri ?? throwRouterError, | ||
| getFeaturedTagsUri: getFeaturedTagsUri ?? throwRouterError, | ||
|
Comment on lines
+67
to
+77
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| parseUri: parseUri ?? ((_uri) => { | ||
| throw new Error("Not implemented"); | ||
| }), | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -76,7 +76,7 @@ function createContext<TContextData>( | |
| sendActivity, | ||
| routeActivity, | ||
| } = values; | ||
| function throwRouteError(): URL { | ||
| function throwRouterError(): URL { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| throw new RouterError("Not implemented"); | ||
| } | ||
| return { | ||
|
|
@@ -90,17 +90,17 @@ function createContext<TContextData>( | |
| contextLoader: contextLoader ?? mockDocumentLoader, | ||
| tracerProvider: tracerProvider ?? noopTracerProvider, | ||
| clone: clone ?? ((data) => createContext({ ...values, data })), | ||
| getNodeInfoUri: getNodeInfoUri ?? throwRouteError, | ||
| getActorUri: getActorUri ?? throwRouteError, | ||
| getObjectUri: getObjectUri ?? throwRouteError, | ||
| getCollectionUri: getCollectionUri ?? throwRouteError, | ||
| getOutboxUri: getOutboxUri ?? throwRouteError, | ||
| getInboxUri: getInboxUri ?? throwRouteError, | ||
| getFollowingUri: getFollowingUri ?? throwRouteError, | ||
| getFollowersUri: getFollowersUri ?? throwRouteError, | ||
| getLikedUri: getLikedUri ?? throwRouteError, | ||
| getFeaturedUri: getFeaturedUri ?? throwRouteError, | ||
| getFeaturedTagsUri: getFeaturedTagsUri ?? throwRouteError, | ||
| getNodeInfoUri: getNodeInfoUri ?? throwRouterError, | ||
| getActorUri: getActorUri ?? throwRouterError, | ||
| getObjectUri: getObjectUri ?? throwRouterError, | ||
| getCollectionUri: getCollectionUri ?? throwRouterError, | ||
| getOutboxUri: getOutboxUri ?? throwRouterError, | ||
| getInboxUri: getInboxUri ?? throwRouterError, | ||
| getFollowingUri: getFollowingUri ?? throwRouterError, | ||
| getFollowersUri: getFollowersUri ?? throwRouterError, | ||
| getLikedUri: getLikedUri ?? throwRouterError, | ||
| getFeaturedUri: getFeaturedUri ?? throwRouterError, | ||
| getFeaturedTagsUri: getFeaturedTagsUri ?? throwRouterError, | ||
|
Comment on lines
+93
to
+103
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| parseUri: parseUri ?? ((_uri) => { | ||
| throw new Error("Not implemented"); | ||
| }), | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -269,7 +269,7 @@ export interface GetDocumentLoaderOptions extends DocumentLoaderFactoryOptions { | |
| * Creates a JSON-LD document loader that utilizes the browser's `fetch` API. | ||
| * | ||
| * The created loader preloads the below frequently used contexts by default | ||
| * (unless `options.ignorePreloadedContexts` is set to `true`): | ||
| * (unless `options.skipPreloadedContexts` is set to `true`): | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| * | ||
| * - <https://www.w3.org/ns/activitystreams> | ||
| * - <https://w3id.org/security/v1> | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,8 +11,8 @@ export class LanguageString extends String { | |
| /** | ||
| * Constructs a new `LanguageString`. | ||
| * @param value A string value written in the given language. | ||
| * @param locale The language of the string. If a string is given, it will | ||
| * be parsed as a `Intl.Locale` object. | ||
| * @param language The language of the string. If a string is given, it will | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| * be parsed as a `Intl.Locale` object. | ||
| */ | ||
| constructor(value: string, language: Intl.Locale | string) { | ||
| super(value); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -283,7 +283,7 @@ async function loadSchema(path: string): Promise<TypeSchema> { | |
| /** | ||
| * Loads all schema files in the directory. | ||
| * @param dir The path of the directory to load schema files from. | ||
| * @returns A map from the qualified URI of a type to its {@link SchemaFile}. | ||
| * @returns A map from the qualified URI of a type to its {@link TypeSchema}. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| * @throws {@link AggregateError} if any schema file is invalid. It contains | ||
| * all {@link SchemaError}s of the invalid schema files. | ||
| */ | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -57,7 +57,6 @@ export interface LookupWebFingerOptions { | |
| /** | ||
| * AbortSignal for cancelling the request. | ||
| * @since 1.8.0 | ||
| * @ | ||
| */ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| signal?: AbortSignal; | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The JSDoc description for
convertHandleToUrlwas updated to correctly reflect theacct:username@domainformat. This improves the accuracy of the documentation.