Skip to content

Commit 4b3366b

Browse files
authored
Merge pull request #539 from moreal/docs-typo-more
Fix several JSDoc typos and incorrect references
2 parents a6f6fa3 + ee594f3 commit 4b3366b

10 files changed

Lines changed: 35 additions & 36 deletions

File tree

packages/cli/src/webfinger/lib.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ export function convertUrlIfHandle(handleOrUrl: string): URL {
2121

2222
/**
2323
* Converts a handle in the format `@username@domain` to a URL.
24-
* The resulting URL will be in the format `https://domain/@username`.
24+
* The resulting URL will be in the format `acct:username@domain`.
2525
* @param handle The handle to convert, in the format `@username@domain`.
2626
* @returns A URL object representing the handle.
2727
* @throws {Error} If the handle format is invalid.
2828
* @example
2929
* ```ts
3030
* const url = convertHandleToUrl("@[email protected]");
31-
* console.log(url.toString()); // "https://domain.com/@username"
31+
* console.log(url.toString()); // "acct:username@domain.com"
3232
* ```
3333
*/
3434
export function convertHandleToUrl(handle: string): URL {

packages/denokv/src/mod.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export class DenoKvStore implements KvStore {
3838
}
3939

4040
/**
41-
* {@inheritDoc KvStore.set}
41+
* {@inheritDoc KvStore.get}
4242
*/
4343
async get<T = unknown>(key: KvKey): Promise<T | undefined> {
4444
const entry = await this.#kv.get<T>(key);

packages/fedify/src/federation/context.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export interface Context<TContextData> {
116116
* @param cls The class of the object.
117117
* @param values The values to pass to the object dispatcher.
118118
* @returns The object's URI.
119-
* @throws {RouteError} If no object dispatcher is available for the class.
119+
* @throws {RouterError} If no object dispatcher is available for the class.
120120
* @throws {TypeError} If values are invalid.
121121
* @since 0.7.0
122122
*/
@@ -383,7 +383,7 @@ export interface Context<TContextData> {
383383
): Promise<void>;
384384

385385
/**
386-
* Sends an activity to the outboxes of the sender's followers.
386+
* Sends an activity to the inboxes of the sender's followers.
387387
* @param sender The sender's identifier or the sender's username.
388388
* @param recipients In this case, it must be `"followers"`.
389389
* @param activity The activity to send.
@@ -429,7 +429,7 @@ export interface Context<TContextData> {
429429
* @param name The name of the collection, which can be a string or a symbol.
430430
* @param values The values of the URI parameters.
431431
* @return The URI of the collection.
432-
* @throws {RouteError} If no object dispatcher is available for the name.
432+
* @throws {RouterError} If no object dispatcher is available for the name.
433433
* @throws {TypeError} If values are invalid.
434434
* @since 1.8.0
435435
*/

packages/fedify/src/federation/federation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ export interface Federatable<TContextData> {
468468
* ([RFC 6570](https://tools.ietf.org/html/rfc6570)).
469469
* The path must have no variables.
470470
* @returns An object to register inbox listeners.
471-
* @throws {RouteError} Thrown if the path pattern is invalid.
471+
* @throws {RouterError} Thrown if the path pattern is invalid.
472472
*/
473473
setInboxListeners(
474474
inboxPath:

packages/fedify/src/testing/context.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export function createContext<TContextData>(
5050
sendActivity,
5151
routeActivity,
5252
} = values;
53-
function throwRouteError(): URL {
53+
function throwRouterError(): URL {
5454
throw new RouterError("Not implemented");
5555
}
5656
return {
@@ -64,17 +64,17 @@ export function createContext<TContextData>(
6464
contextLoader: contextLoader ?? mockDocumentLoader,
6565
tracerProvider: tracerProvider ?? trace.getTracerProvider(),
6666
clone: clone ?? ((data) => createContext({ ...values, data })),
67-
getNodeInfoUri: getNodeInfoUri ?? throwRouteError,
68-
getActorUri: getActorUri ?? throwRouteError,
69-
getObjectUri: getObjectUri ?? throwRouteError,
70-
getCollectionUri: getCollectionUri ?? throwRouteError,
71-
getOutboxUri: getOutboxUri ?? throwRouteError,
72-
getInboxUri: getInboxUri ?? throwRouteError,
73-
getFollowingUri: getFollowingUri ?? throwRouteError,
74-
getFollowersUri: getFollowersUri ?? throwRouteError,
75-
getLikedUri: getLikedUri ?? throwRouteError,
76-
getFeaturedUri: getFeaturedUri ?? throwRouteError,
77-
getFeaturedTagsUri: getFeaturedTagsUri ?? throwRouteError,
67+
getNodeInfoUri: getNodeInfoUri ?? throwRouterError,
68+
getActorUri: getActorUri ?? throwRouterError,
69+
getObjectUri: getObjectUri ?? throwRouterError,
70+
getCollectionUri: getCollectionUri ?? throwRouterError,
71+
getOutboxUri: getOutboxUri ?? throwRouterError,
72+
getInboxUri: getInboxUri ?? throwRouterError,
73+
getFollowingUri: getFollowingUri ?? throwRouterError,
74+
getFollowersUri: getFollowersUri ?? throwRouterError,
75+
getLikedUri: getLikedUri ?? throwRouterError,
76+
getFeaturedUri: getFeaturedUri ?? throwRouterError,
77+
getFeaturedTagsUri: getFeaturedTagsUri ?? throwRouterError,
7878
parseUri: parseUri ?? ((_uri) => {
7979
throw new Error("Not implemented");
8080
}),

packages/testing/src/context.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ function createContext<TContextData>(
7676
sendActivity,
7777
routeActivity,
7878
} = values;
79-
function throwRouteError(): URL {
79+
function throwRouterError(): URL {
8080
throw new RouterError("Not implemented");
8181
}
8282
return {
@@ -90,17 +90,17 @@ function createContext<TContextData>(
9090
contextLoader: contextLoader ?? mockDocumentLoader,
9191
tracerProvider: tracerProvider ?? noopTracerProvider,
9292
clone: clone ?? ((data) => createContext({ ...values, data })),
93-
getNodeInfoUri: getNodeInfoUri ?? throwRouteError,
94-
getActorUri: getActorUri ?? throwRouteError,
95-
getObjectUri: getObjectUri ?? throwRouteError,
96-
getCollectionUri: getCollectionUri ?? throwRouteError,
97-
getOutboxUri: getOutboxUri ?? throwRouteError,
98-
getInboxUri: getInboxUri ?? throwRouteError,
99-
getFollowingUri: getFollowingUri ?? throwRouteError,
100-
getFollowersUri: getFollowersUri ?? throwRouteError,
101-
getLikedUri: getLikedUri ?? throwRouteError,
102-
getFeaturedUri: getFeaturedUri ?? throwRouteError,
103-
getFeaturedTagsUri: getFeaturedTagsUri ?? throwRouteError,
93+
getNodeInfoUri: getNodeInfoUri ?? throwRouterError,
94+
getActorUri: getActorUri ?? throwRouterError,
95+
getObjectUri: getObjectUri ?? throwRouterError,
96+
getCollectionUri: getCollectionUri ?? throwRouterError,
97+
getOutboxUri: getOutboxUri ?? throwRouterError,
98+
getInboxUri: getInboxUri ?? throwRouterError,
99+
getFollowingUri: getFollowingUri ?? throwRouterError,
100+
getFollowersUri: getFollowersUri ?? throwRouterError,
101+
getLikedUri: getLikedUri ?? throwRouterError,
102+
getFeaturedUri: getFeaturedUri ?? throwRouterError,
103+
getFeaturedTagsUri: getFeaturedTagsUri ?? throwRouterError,
104104
parseUri: parseUri ?? ((_uri) => {
105105
throw new Error("Not implemented");
106106
}),

packages/vocab-runtime/src/docloader.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ export interface GetDocumentLoaderOptions extends DocumentLoaderFactoryOptions {
269269
* Creates a JSON-LD document loader that utilizes the browser's `fetch` API.
270270
*
271271
* The created loader preloads the below frequently used contexts by default
272-
* (unless `options.ignorePreloadedContexts` is set to `true`):
272+
* (unless `options.skipPreloadedContexts` is set to `true`):
273273
*
274274
* - <https://www.w3.org/ns/activitystreams>
275275
* - <https://w3id.org/security/v1>

packages/vocab-runtime/src/langstr.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ export class LanguageString extends String {
1111
/**
1212
* Constructs a new `LanguageString`.
1313
* @param value A string value written in the given language.
14-
* @param locale The language of the string. If a string is given, it will
15-
* be parsed as a `Intl.Locale` object.
14+
* @param language The language of the string. If a string is given, it will
15+
* be parsed as a `Intl.Locale` object.
1616
*/
1717
constructor(value: string, language: Intl.Locale | string) {
1818
super(value);

packages/vocab-tools/src/schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ async function loadSchema(path: string): Promise<TypeSchema> {
283283
/**
284284
* Loads all schema files in the directory.
285285
* @param dir The path of the directory to load schema files from.
286-
* @returns A map from the qualified URI of a type to its {@link SchemaFile}.
286+
* @returns A map from the qualified URI of a type to its {@link TypeSchema}.
287287
* @throws {@link AggregateError} if any schema file is invalid. It contains
288288
* all {@link SchemaError}s of the invalid schema files.
289289
*/

packages/webfinger/src/lookup.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ export interface LookupWebFingerOptions {
5757
/**
5858
* AbortSignal for cancelling the request.
5959
* @since 1.8.0
60-
* @
6160
*/
6261
signal?: AbortSignal;
6362
}

0 commit comments

Comments
 (0)