Skip to content

Commit 61a040b

Browse files
committed
docs: fix {@linkcode ...} syntax to support external modules
jsr-io/jsr#635 (comment)
1 parent 243dfc5 commit 61a040b

36 files changed

+185
-155
lines changed

as/mod.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const as: {
1414
/**
1515
* Annotate the given predicate function as optional.
1616
*
17-
* Use this function to annotate a predicate function of `predObj` in {@linkcode isObjectOf}.
17+
* Use this function to annotate a predicate function of `predObj` in {@linkcode [is/object-of].isObjectOf|isObjectOf}.
1818
*
1919
* Note that the annotated predicate function will return `true` if the type of `x` is `T` or `undefined`, indicating that
2020
* this function is not just for annotation but it also changes the behavior of the predicate function.
@@ -40,7 +40,7 @@ export const as: {
4040
/**
4141
* Annotate the given predicate function as readonly.
4242
*
43-
* Use this function to annotate a predicate function of `predObj` in {@linkcode isObjectOf}.
43+
* Use this function to annotate a predicate function of `predObj` in {@linkcode [is/object-of].isObjectOf|isObjectOf}.
4444
*
4545
* Use {@linkcode asUnreadonly} to remove the annotation.
4646
* Use {@linkcode hasReadonly} to check if a predicate function has annotated with this function.
@@ -63,7 +63,7 @@ export const as: {
6363
/**
6464
* Unannotate the annotated predicate function with {@linkcode asOptional}.
6565
*
66-
* Use this function to unannotate a predicate function of `predObj` in {@linkcode isObjectOf}.
66+
* Use this function to unannotate a predicate function of `predObj` in {@linkcode [is/object-of].isObjectOf|isObjectOf}.
6767
*
6868
* Note that the annotated predicate function will return `true` if the type of `x` is `T`, indicating that
6969
* this function is not just for annotation but it also changes the behavior of the predicate function.
@@ -86,7 +86,7 @@ export const as: {
8686
/**
8787
* Unannotate the annotated predicate function with {@linkcode asReadonly}.
8888
*
89-
* Use this function to unannotate a predicate function of `predObj` in {@linkcode isObjectOf}.
89+
* Use this function to unannotate a predicate function of `predObj` in {@linkcode [is/object-of].isObjectOf|isObjectOf}.
9090
*
9191
* To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost.
9292
*

as/optional.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
/**
1111
* Annotate the given predicate function as optional.
1212
*
13-
* Use this function to annotate a predicate function of `predObj` in {@linkcode isObjectOf}.
13+
* Use this function to annotate a predicate function of `predObj` in {@linkcode [is/object-of].isObjectOf|isObjectOf}.
1414
*
1515
* Note that the annotated predicate function will return `true` if the type of `x` is `T` or `undefined`, indicating that
1616
* this function is not just for annotation but it also changes the behavior of the predicate function.
@@ -61,7 +61,7 @@ export function asOptional<P extends Predicate<unknown>>(
6161
/**
6262
* Unannotate the annotated predicate function with {@linkcode asOptional}.
6363
*
64-
* Use this function to unannotate a predicate function of `predObj` in {@linkcode isObjectOf}.
64+
* Use this function to unannotate a predicate function of `predObj` in {@linkcode [is/object-of].isObjectOf|isObjectOf}.
6565
*
6666
* Note that the annotated predicate function will return `true` if the type of `x` is `T`, indicating that
6767
* this function is not just for annotation but it also changes the behavior of the predicate function.

as/readonly.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
/**
1111
* Annotate the given predicate function as readonly.
1212
*
13-
* Use this function to annotate a predicate function of `predObj` in {@linkcode isObjectOf}.
13+
* Use this function to annotate a predicate function of `predObj` in {@linkcode [is/object-of].isObjectOf|isObjectOf}.
1414
*
1515
* Use {@linkcode asUnreadonly} to remove the annotation.
1616
* Use {@linkcode hasReadonly} to check if a predicate function has annotated with this function.
@@ -45,7 +45,7 @@ export function asReadonly<P extends Predicate<unknown>>(
4545
/**
4646
* Unannotate the annotated predicate function with {@linkcode asReadonly}.
4747
*
48-
* Use this function to unannotate a predicate function of `predObj` in {@linkcode isObjectOf}.
48+
* Use this function to unannotate a predicate function of `predObj` in {@linkcode [is/object-of].isObjectOf|isObjectOf}.
4949
*
5050
* To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost.
5151
*

ensure.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { assert } from "./assert.ts";
44
/**
55
* Ensures that the given value satisfies the provided predicate.
66
*
7-
* It throws {@linkcode AssertError} if the value does not satisfy the predicate.
7+
* It throws {@linkcode [assert].AssertError|AssertError} if the value does not satisfy the predicate.
88
*
99
* ```ts
1010
* import { ensure, is } from "@core/unknownutil";

is/any.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* Assume `x is `any` and always return `true` regardless of the type of `x`.
33
*
4-
* Use {@linkcode isUnknown} to assume that a value is `unknown`.
4+
* Use {@linkcode [is/unknown].isUnknown|isUnknown} to assume that a value is `unknown`.
55
*
66
* ```ts
77
* import { is } from "@core/unknownutil";

is/array.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* Return `true` if the type of `x` is `unknown[]`.
33
*
4-
* Use {@linkcode isArrayOf} to check if the type of `x` is an array of `T`.
4+
* Use {@linkcode [is/arrayt-of].isArrayOf|isArrayOf} to check if the type of `x` is an array of `T`.
55
*
66
* ```ts
77
* import { is } from "@core/unknownutil";

is/array_of.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { isArray } from "./array.ts";
55
/**
66
* Return a type predicate function that returns `true` if the type of `x` is `T[]`.
77
*
8-
* Use {@linkcode isArray} to check if the type of `x` is an array of `unknown`.
8+
* Use {@linkcode [is/array].isArray|isArray} to check if the type of `x` is an array of `unknown`.
99
*
1010
* To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost.
1111
*

is/async_function.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ const objectToString = Object.prototype.toString;
33
/**
44
* Return `true` if the type of `x` is `function` (async function).
55
*
6-
* Use {@linkcode isFunction} to check if the type of `x` is a function.
7-
* Use {@linkcode isSyncFunction} to check if the type of `x` is a synchronous function.
6+
* Use {@linkcode [is/function].isFunction|isFunction} to check if the type of `x` is a function.
7+
* Use {@linkcode [is/sync-function].isSyncFunction|isSyncFunction} to check if the type of `x` is a synchronous function.
88
*
99
* ```ts
1010
* import { is } from "@core/unknownutil";

is/function.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/**
22
* Return `true` if the type of `x` is `function`.
33
*
4-
* Use {@linkcode isSyncFunction} to check if the type of `x` is a synchronous function.
5-
* Use {@linkcode isAsyncFunction} to check if the type of `x` is an asynchronous function.
4+
* Use {@linkcode [is/sync-function].isSyncFunction|isSyncFunction} to check if the type of `x` is a synchronous function.
5+
* Use {@linkcode [is/async-function].isAsyncFunction|isAsyncFunction} to check if the type of `x` is an asynchronous function.
66
*
77
* ```ts
88
* import { is } from "@core/unknownutil";

is/intersection_of.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { isObjectOf } from "./object_of.ts";
66
/**
77
* Return a type predicate function that returns `true` if the type of `x` is `IntersectionOf<T>`.
88
*
9-
* Use {@linkcode isUnionOf} to check if the type of `x` is a union of `T`.
9+
* Use {@linkcode [is/union-of].isUnionOf|isUnionOf} to check if the type of `x` is a union of `T`.
1010
*
1111
* To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost.
1212
*

0 commit comments

Comments
 (0)