From 61a040b532294a4c78681de9e9cc2c6f15dac603 Mon Sep 17 00:00:00 2001 From: Alisue Date: Wed, 21 Aug 2024 23:41:27 +0900 Subject: [PATCH] docs: fix `{@linkcode ...}` syntax to support external modules https://github.com/jsr-io/jsr/issues/635#issuecomment-2302358847 --- as/mod.ts | 8 +- as/optional.ts | 4 +- as/readonly.ts | 4 +- ensure.ts | 2 +- is/any.ts | 2 +- is/array.ts | 2 +- is/array_of.ts | 2 +- is/async_function.ts | 4 +- is/function.ts | 4 +- is/intersection_of.ts | 2 +- is/literal_of.ts | 4 +- is/literal_one_of.ts | 4 +- is/map.ts | 2 +- is/map_of.ts | 2 +- is/mod.ts | 161 ++++++++++++++++++++++------------------- is/null.ts | 4 +- is/nullish.ts | 4 +- is/object_of.ts | 8 +- is/omit_of.ts | 16 ++-- is/parameters_of.ts | 3 +- is/partial_of.ts | 16 ++-- is/pick_of.ts | 16 ++-- is/readonly_of.ts | 11 +++ is/record.ts | 2 +- is/record_object.ts | 2 +- is/record_object_of.ts | 2 +- is/record_of.ts | 2 +- is/required_of.ts | 16 ++-- is/set.ts | 2 +- is/set_of.ts | 2 +- is/strict_of.ts | 16 ++-- is/sync_function.ts | 3 + is/tuple_of.ts | 2 +- is/uniform_tuple_of.ts | 2 +- is/union_of.ts | 2 +- is/unknown.ts | 2 +- 36 files changed, 185 insertions(+), 155 deletions(-) diff --git a/as/mod.ts b/as/mod.ts index 56fab8f..cc78ac7 100644 --- a/as/mod.ts +++ b/as/mod.ts @@ -14,7 +14,7 @@ export const as: { /** * Annotate the given predicate function as optional. * - * Use this function to annotate a predicate function of `predObj` in {@linkcode isObjectOf}. + * Use this function to annotate a predicate function of `predObj` in {@linkcode [is/object-of].isObjectOf|isObjectOf}. * * Note that the annotated predicate function will return `true` if the type of `x` is `T` or `undefined`, indicating that * this function is not just for annotation but it also changes the behavior of the predicate function. @@ -40,7 +40,7 @@ export const as: { /** * Annotate the given predicate function as readonly. * - * Use this function to annotate a predicate function of `predObj` in {@linkcode isObjectOf}. + * Use this function to annotate a predicate function of `predObj` in {@linkcode [is/object-of].isObjectOf|isObjectOf}. * * Use {@linkcode asUnreadonly} to remove the annotation. * Use {@linkcode hasReadonly} to check if a predicate function has annotated with this function. @@ -63,7 +63,7 @@ export const as: { /** * Unannotate the annotated predicate function with {@linkcode asOptional}. * - * Use this function to unannotate a predicate function of `predObj` in {@linkcode isObjectOf}. + * Use this function to unannotate a predicate function of `predObj` in {@linkcode [is/object-of].isObjectOf|isObjectOf}. * * Note that the annotated predicate function will return `true` if the type of `x` is `T`, indicating that * this function is not just for annotation but it also changes the behavior of the predicate function. @@ -86,7 +86,7 @@ export const as: { /** * Unannotate the annotated predicate function with {@linkcode asReadonly}. * - * Use this function to unannotate a predicate function of `predObj` in {@linkcode isObjectOf}. + * Use this function to unannotate a predicate function of `predObj` in {@linkcode [is/object-of].isObjectOf|isObjectOf}. * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * diff --git a/as/optional.ts b/as/optional.ts index acadffd..53ea462 100644 --- a/as/optional.ts +++ b/as/optional.ts @@ -10,7 +10,7 @@ import { /** * Annotate the given predicate function as optional. * - * Use this function to annotate a predicate function of `predObj` in {@linkcode isObjectOf}. + * Use this function to annotate a predicate function of `predObj` in {@linkcode [is/object-of].isObjectOf|isObjectOf}. * * Note that the annotated predicate function will return `true` if the type of `x` is `T` or `undefined`, indicating that * this function is not just for annotation but it also changes the behavior of the predicate function. @@ -61,7 +61,7 @@ export function asOptional

>( /** * Unannotate the annotated predicate function with {@linkcode asOptional}. * - * Use this function to unannotate a predicate function of `predObj` in {@linkcode isObjectOf}. + * Use this function to unannotate a predicate function of `predObj` in {@linkcode [is/object-of].isObjectOf|isObjectOf}. * * Note that the annotated predicate function will return `true` if the type of `x` is `T`, indicating that * this function is not just for annotation but it also changes the behavior of the predicate function. diff --git a/as/readonly.ts b/as/readonly.ts index ea0293f..b8bf675 100644 --- a/as/readonly.ts +++ b/as/readonly.ts @@ -10,7 +10,7 @@ import { /** * Annotate the given predicate function as readonly. * - * Use this function to annotate a predicate function of `predObj` in {@linkcode isObjectOf}. + * Use this function to annotate a predicate function of `predObj` in {@linkcode [is/object-of].isObjectOf|isObjectOf}. * * Use {@linkcode asUnreadonly} to remove the annotation. * Use {@linkcode hasReadonly} to check if a predicate function has annotated with this function. @@ -45,7 +45,7 @@ export function asReadonly

>( /** * Unannotate the annotated predicate function with {@linkcode asReadonly}. * - * Use this function to unannotate a predicate function of `predObj` in {@linkcode isObjectOf}. + * Use this function to unannotate a predicate function of `predObj` in {@linkcode [is/object-of].isObjectOf|isObjectOf}. * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * diff --git a/ensure.ts b/ensure.ts index 8587c03..6de3e7a 100644 --- a/ensure.ts +++ b/ensure.ts @@ -4,7 +4,7 @@ import { assert } from "./assert.ts"; /** * Ensures that the given value satisfies the provided predicate. * - * It throws {@linkcode AssertError} if the value does not satisfy the predicate. + * It throws {@linkcode [assert].AssertError|AssertError} if the value does not satisfy the predicate. * * ```ts * import { ensure, is } from "@core/unknownutil"; diff --git a/is/any.ts b/is/any.ts index e3a177a..f2ffc8a 100644 --- a/is/any.ts +++ b/is/any.ts @@ -1,7 +1,7 @@ /** * Assume `x is `any` and always return `true` regardless of the type of `x`. * - * Use {@linkcode isUnknown} to assume that a value is `unknown`. + * Use {@linkcode [is/unknown].isUnknown|isUnknown} to assume that a value is `unknown`. * * ```ts * import { is } from "@core/unknownutil"; diff --git a/is/array.ts b/is/array.ts index 9921c1d..dddaa6a 100644 --- a/is/array.ts +++ b/is/array.ts @@ -1,7 +1,7 @@ /** * Return `true` if the type of `x` is `unknown[]`. * - * Use {@linkcode isArrayOf} to check if the type of `x` is an array of `T`. + * Use {@linkcode [is/arrayt-of].isArrayOf|isArrayOf} to check if the type of `x` is an array of `T`. * * ```ts * import { is } from "@core/unknownutil"; diff --git a/is/array_of.ts b/is/array_of.ts index abd4993..8a6a299 100644 --- a/is/array_of.ts +++ b/is/array_of.ts @@ -5,7 +5,7 @@ import { isArray } from "./array.ts"; /** * Return a type predicate function that returns `true` if the type of `x` is `T[]`. * - * Use {@linkcode isArray} to check if the type of `x` is an array of `unknown`. + * Use {@linkcode [is/array].isArray|isArray} to check if the type of `x` is an array of `unknown`. * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * diff --git a/is/async_function.ts b/is/async_function.ts index 78db3eb..4eedee1 100644 --- a/is/async_function.ts +++ b/is/async_function.ts @@ -3,8 +3,8 @@ const objectToString = Object.prototype.toString; /** * Return `true` if the type of `x` is `function` (async function). * - * Use {@linkcode isFunction} to check if the type of `x` is a function. - * Use {@linkcode isSyncFunction} to check if the type of `x` is a synchronous function. + * Use {@linkcode [is/function].isFunction|isFunction} to check if the type of `x` is a function. + * Use {@linkcode [is/sync-function].isSyncFunction|isSyncFunction} to check if the type of `x` is a synchronous function. * * ```ts * import { is } from "@core/unknownutil"; diff --git a/is/function.ts b/is/function.ts index 9b6cc71..566e9a7 100644 --- a/is/function.ts +++ b/is/function.ts @@ -1,8 +1,8 @@ /** * Return `true` if the type of `x` is `function`. * - * Use {@linkcode isSyncFunction} to check if the type of `x` is a synchronous function. - * Use {@linkcode isAsyncFunction} to check if the type of `x` is an asynchronous function. + * Use {@linkcode [is/sync-function].isSyncFunction|isSyncFunction} to check if the type of `x` is a synchronous function. + * Use {@linkcode [is/async-function].isAsyncFunction|isAsyncFunction} to check if the type of `x` is an asynchronous function. * * ```ts * import { is } from "@core/unknownutil"; diff --git a/is/intersection_of.ts b/is/intersection_of.ts index 0b748d8..de46010 100644 --- a/is/intersection_of.ts +++ b/is/intersection_of.ts @@ -6,7 +6,7 @@ import { isObjectOf } from "./object_of.ts"; /** * Return a type predicate function that returns `true` if the type of `x` is `IntersectionOf`. * - * Use {@linkcode isUnionOf} to check if the type of `x` is a union of `T`. + * Use {@linkcode [is/union-of].isUnionOf|isUnionOf} to check if the type of `x` is a union of `T`. * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * diff --git a/is/literal_of.ts b/is/literal_of.ts index 1388675..ae3fbec 100644 --- a/is/literal_of.ts +++ b/is/literal_of.ts @@ -4,8 +4,8 @@ import type { Predicate, Primitive } from "../type.ts"; /** * Return a type predicate function that returns `true` if the type of `x` is a literal type of `pred`. * - * Use {@linkcode isLiteral} to check if the type of `x` is a literal type. - * Use {@linkcode isLiteralOneOf} to check if the type of `x` is one of the literal type of `Primitive[]`. + * Use {@linkcode [is/literal].isLiteral|isLiteral} to check if the type of `x` is a literal type. + * Use {@linkcode [is/literal-one-of].isLiteralOneOf|isLiteralOneOf} to check if the type of `x` is one of the literal type of {@linkcode [type].Primitive|Primitive[]}. * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * diff --git a/is/literal_one_of.ts b/is/literal_one_of.ts index b60547b..42bb0f2 100644 --- a/is/literal_one_of.ts +++ b/is/literal_one_of.ts @@ -4,8 +4,8 @@ import type { Predicate, Primitive } from "../type.ts"; /** * Return a type predicate function that returns `true` if the type of `x` is one of literal type in `preds`. * - * Use {@linkcode isLiteral} to check if the type of `x` is a literal type. - * Use {@linkcode isLiteralOf} to check if the type of `x` is a literal type of `Primitive`. + * Use {@linkcode [is/literal].isLiteral|isLiteral} to check if the type of `x` is a literal type. + * Use {@linkcode [is/literal-of].isLiteralOf|isLiteralOf} to check if the type of `x` is a literal type of {@linkcode [type].Primitive|Primitive}. * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * diff --git a/is/map.ts b/is/map.ts index 545a993..ae6aac0 100644 --- a/is/map.ts +++ b/is/map.ts @@ -1,7 +1,7 @@ /** * Return `true` if the type of `x` is `Map`. * - * Use {@linkcode isMapOf} to check if the type of `x` is a map of `T`. + * Use {@linkcode [is/map-of].isMapOf|isMapOf} to check if the type of `x` is a map of `T`. * * ```ts * import { is } from "@core/unknownutil"; diff --git a/is/map_of.ts b/is/map_of.ts index cf4bc68..2065048 100644 --- a/is/map_of.ts +++ b/is/map_of.ts @@ -5,7 +5,7 @@ import { isMap } from "./map.ts"; /** * Return a type predicate function that returns `true` if the type of `x` is `Map`. * - * Use {@linkcode isMap} to check if the type of `x` is a map of `unknown`. + * Use {@linkcode [is/map].isMap|isMap} to check if the type of `x` is a map of `unknown`. * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * diff --git a/is/mod.ts b/is/mod.ts index 3d1b896..6e6231c 100644 --- a/is/mod.ts +++ b/is/mod.ts @@ -86,7 +86,7 @@ export const is: { /** * Assume `x is `any` and always return `true` regardless of the type of `x`. * - * Use {@linkcode isUnknown} to assume that a value is `unknown`. + * Use {@linkcode [is/unknown].isUnknown|isUnknown} to assume that a value is `unknown`. * * ```ts * import { is } from "@core/unknownutil"; @@ -101,7 +101,7 @@ export const is: { /** * Return `true` if the type of `x` is `unknown[]`. * - * Use {@linkcode isArrayOf} to check if the type of `x` is an array of `T`. + * Use {@linkcode [is/arrayt-of].isArrayOf|isArrayOf} to check if the type of `x` is an array of `T`. * * ```ts * import { is } from "@core/unknownutil"; @@ -116,7 +116,7 @@ export const is: { /** * Return a type predicate function that returns `true` if the type of `x` is `T[]`. * - * Use {@linkcode isArray} to check if the type of `x` is an array of `unknown`. + * Use {@linkcode [is/array].isArray|isArray} to check if the type of `x` is an array of `unknown`. * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * @@ -134,8 +134,8 @@ export const is: { /** * Return `true` if the type of `x` is `function` (async function). * - * Use {@linkcode isFunction} to check if the type of `x` is a function. - * Use {@linkcode isSyncFunction} to check if the type of `x` is a synchronous function. + * Use {@linkcode [is/function].isFunction|isFunction} to check if the type of `x` is a function. + * Use {@linkcode [is/sync-function].isSyncFunction|isSyncFunction} to check if the type of `x` is a synchronous function. * * ```ts * import { is } from "@core/unknownutil"; @@ -176,8 +176,8 @@ export const is: { /** * Return `true` if the type of `x` is `function`. * - * Use {@linkcode isSyncFunction} to check if the type of `x` is a synchronous function. - * Use {@linkcode isAsyncFunction} to check if the type of `x` is an asynchronous function. + * Use {@linkcode [is/sync-function].isSyncFunction|isSyncFunction} to check if the type of `x` is a synchronous function. + * Use {@linkcode [is/async-function].isAsyncFunction|isAsyncFunction} to check if the type of `x` is an asynchronous function. * * ```ts * import { is } from "@core/unknownutil"; @@ -208,7 +208,7 @@ export const is: { /** * Return a type predicate function that returns `true` if the type of `x` is `IntersectionOf`. * - * Use {@linkcode isUnionOf} to check if the type of `x` is a union of `T`. + * Use {@linkcode [is/union-of].isUnionOf|isUnionOf} to check if the type of `x` is a union of `T`. * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * @@ -246,8 +246,8 @@ export const is: { /** * Return a type predicate function that returns `true` if the type of `x` is a literal type of `pred`. * - * Use {@linkcode isLiteral} to check if the type of `x` is a literal type. - * Use {@linkcode isLiteralOneOf} to check if the type of `x` is one of the literal type of `Primitive[]`. + * Use {@linkcode [is/literal].isLiteral|isLiteral} to check if the type of `x` is a literal type. + * Use {@linkcode [is/literal-one-of].isLiteralOneOf|isLiteralOneOf} to check if the type of `x` is one of the literal type of {@linkcode [type].Primitive|Primitive[]}. * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * @@ -265,8 +265,8 @@ export const is: { /** * Return a type predicate function that returns `true` if the type of `x` is one of literal type in `preds`. * - * Use {@linkcode isLiteral} to check if the type of `x` is a literal type. - * Use {@linkcode isLiteralOf} to check if the type of `x` is a literal type of `Primitive`. + * Use {@linkcode [is/literal].isLiteral|isLiteral} to check if the type of `x` is a literal type. + * Use {@linkcode [is/literal-of].isLiteralOf|isLiteralOf} to check if the type of `x` is a literal type of {@linkcode [type].Primitive|Primitive}. * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * @@ -284,7 +284,7 @@ export const is: { /** * Return `true` if the type of `x` is `Map`. * - * Use {@linkcode isMapOf} to check if the type of `x` is a map of `T`. + * Use {@linkcode [is/map-of].isMapOf|isMapOf} to check if the type of `x` is a map of `T`. * * ```ts * import { is } from "@core/unknownutil"; @@ -299,7 +299,7 @@ export const is: { /** * Return a type predicate function that returns `true` if the type of `x` is `Map`. * - * Use {@linkcode isMap} to check if the type of `x` is a map of `unknown`. + * Use {@linkcode [is/map].isMap|isMap} to check if the type of `x` is a map of `unknown`. * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * @@ -329,8 +329,8 @@ export const is: { /** * Return `true` if the type of `x` is `null`. * - * Use {@linkcode isUndefined} to check if the type of `x` is `undefined`. - * Use {@linkcode isNullish} to check if the type of `x` is `null` or `undefined`. + * Use {@linkcode [is/undefined].isUndefined|isUndefined} to check if the type of `x` is `undefined`. + * Use {@linkcode [is/nullish].isNullish|isNullish} to check if the type of `x` is `null` or `undefined`. * * ```ts * import { is } from "@core/unknownutil"; @@ -345,8 +345,8 @@ export const is: { /** * Return `true` if the type of `x` is `null` or `undefined`. * - * Use {@linkcode isNull} to check if the type of `x` is `null`. - * Use {@linkcode isUndefined} to check if the type of `x` is `undefined`. + * Use {@linkcode [is/null].isNull|isNull} to check if the type of `x` is `null`. + * Use {@linkcode [is/undefined].isUndefined|isUndefined} to check if the type of `x` is `undefined`. * * ```ts * import { is } from "@core/unknownutil"; @@ -374,13 +374,13 @@ export const is: { /** * Return a type predicate function that returns `true` if the type of `x` is `ObjectOf`. * - * Use {@linkcode isRecordOf} if you want to check if the type of `x` is a record of `T`. + * Use {@linkcode [is/record-of].isRecordOf|isRecordOf} if you want to check if the type of `x` is a record of `T`. * - * If {@linkcode asOptional} is specified in the predicate function in `predObj`, the property becomes optional. - * If {@linkcode asReadonly} is specified in the predicate function in `predObj`, the property becomes readonly. + * If {@linkcode [as/optional].asOptional|asOptional} is specified in the predicate function in `predObj`, the property becomes optional. + * If {@linkcode [as/readonly].asReadonly|asReadonly} is specified in the predicate function in `predObj`, the property becomes readonly. * * The number of keys of `x` must be greater than or equal to the number of keys of `predObj`. - * Use {@linkcode isStrictOf} if you want to check the exact number of keys. + * Use {@linkcode [is/strict-of].isStrictOf|isStrictOf} if you want to check the exact number of keys. * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * @@ -405,14 +405,14 @@ export const is: { * * It only supports modifing a predicate function annotated with `IsPredObj`, usually returned by the followings * - * - {@linkcode isIntersectionOf} - * - {@linkcode isObjectOf} - * - {@linkcode isOmitOf} - * - {@linkcode isPartialOf} - * - {@linkcode isPickOf} - * - {@linkcode isReadonlyOf} - * - {@linkcode isRequiredOf} - * - {@linkcode isStrictOf} + * - {@linkcode [is/intersection-of].isIntersectionOf|isIntersectionOf} + * - {@linkcode [is/object-of].isObjectOf|isObjectOf} + * - {@linkcode [is/omit-of].isOmitOf|isOmitOf} + * - {@linkcode [is/partial-of].isPartialOf|isPartialOf} + * - {@linkcode [is/pick-of].isPickOf|isPickOf} + * - {@linkcode [is/readonly-of].isReadonlyOf|isReadonlyOf} + * - {@linkcode [is/required-of].isRequiredOf|isRequiredOf} + * - {@linkcode [is/strict-of].isStrictOf|isStrictOf} * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * @@ -434,7 +434,8 @@ export const is: { /** * Return a type predicate function that returns `true` if the type of `x` is `ParametersOf` or `ParametersOf`. * - * This is similar to {@linkcode isTupleOf}, but if {@linkcode asOptional} is specified at the trailing, the trailing elements becomes optional and makes variable-length tuple. + * This is similar to {@linkcode [is/tuple].isTupleOf|isTupleOf}, but if {@linkcode [as/optional].asOptional|asOptional} + * is specified at the trailing, the trailing elements becomes optional and makes variable-length tuple. * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * @@ -494,14 +495,14 @@ export const is: { * * It only supports modifing a predicate function annotated with `IsPredObj`, usually returned by the followings * - * - {@linkcode isIntersectionOf} - * - {@linkcode isObjectOf} - * - {@linkcode isOmitOf} - * - {@linkcode isPartialOf} - * - {@linkcode isPickOf} - * - {@linkcode isReadonlyOf} - * - {@linkcode isRequiredOf} - * - {@linkcode isStrictOf} + * - {@linkcode [is/intersection-of].isIntersectionOf|isIntersectionOf} + * - {@linkcode [is/object-of].isObjectOf|isObjectOf} + * - {@linkcode [is/omit-of].isOmitOf|isOmitOf} + * - {@linkcode [is/partial-of].isPartialOf|isPartialOf} + * - {@linkcode [is/pick-of].isPickOf|isPickOf} + * - {@linkcode [is/readonly-of].isReadonlyOf|isReadonlyOf} + * - {@linkcode [is/required-of].isRequiredOf|isRequiredOf} + * - {@linkcode [is/strict-of].isStrictOf|isStrictOf} * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * @@ -525,14 +526,14 @@ export const is: { * * It only supports modifing a predicate function annotated with `IsPredObj`, usually returned by the followings * - * - {@linkcode isIntersectionOf} - * - {@linkcode isObjectOf} - * - {@linkcode isOmitOf} - * - {@linkcode isPartialOf} - * - {@linkcode isPickOf} - * - {@linkcode isReadonlyOf} - * - {@linkcode isRequiredOf} - * - {@linkcode isStrictOf} + * - {@linkcode [is/intersection-of].isIntersectionOf|isIntersectionOf} + * - {@linkcode [is/object-of].isObjectOf|isObjectOf} + * - {@linkcode [is/omit-of].isOmitOf|isOmitOf} + * - {@linkcode [is/partial-of].isPartialOf|isPartialOf} + * - {@linkcode [is/pick-of].isPickOf|isPickOf} + * - {@linkcode [is/readonly-of].isReadonlyOf|isReadonlyOf} + * - {@linkcode [is/required-of].isRequiredOf|isRequiredOf} + * - {@linkcode [is/strict-of].isStrictOf|isStrictOf} * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * @@ -567,6 +568,17 @@ export const is: { /** * Return a type predicate function that returns `true` if the type of `x` is `Readonly>`. * + * It only supports modifing a predicate function annotated with `IsPredObj`, usually returned by the followings + * + * - {@linkcode [is/intersection-of].isIntersectionOf|isIntersectionOf} + * - {@linkcode [is/object-of].isObjectOf|isObjectOf} + * - {@linkcode [is/omit-of].isOmitOf|isOmitOf} + * - {@linkcode [is/partial-of].isPartialOf|isPartialOf} + * - {@linkcode [is/pick-of].isPickOf|isPickOf} + * - {@linkcode [is/readonly-of].isReadonlyOf|isReadonlyOf} + * - {@linkcode [is/required-of].isRequiredOf|isRequiredOf} + * - {@linkcode [is/strict-of].isStrictOf|isStrictOf} + * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * * ```typescript @@ -588,7 +600,7 @@ export const is: { * Return `true` if the type of `x` satisfies `Record`. * * Note that this function returns `true` for ambiguous instances like `Set`, `Map`, `Date`, `Promise`, etc. - * Use {@linkcode isRecordObject} instead if you want to check if `x` is an instance of `Object`. + * Use {@linkcode [is/record-object].isRecordObject|isRecordObject} instead if you want to check if `x` is an instance of `Object`. * * ```ts * import { is } from "@core/unknownutil"; @@ -609,7 +621,7 @@ export const is: { * Return `true` if the type of `x` is an object instance that satisfies `Record`. * * Note that this function check if the `x` is an instance of `Object`. - * Use {@linkcode isRecord} instead if you want to check if the `x` satisfies the `Record` type. + * Use {@linkcode [is/record].isRecord|isRecord} instead if you want to check if the `x` satisfies the `Record` type. * * ```ts * import { is } from "@core/unknownutil"; @@ -630,7 +642,7 @@ export const is: { * Return a type predicate function that returns `true` if the type of `x` is an Object instance that satisfies `Record`. * * Note that this function check if the `x` is an instance of `Object`. - * Use {@linkcode isRecordOf} instead if you want to check if the `x` satisfies the `Record` type. + * Use {@linkcode [is/record-of].isRecordOf|isRecordOf} instead if you want to check if the `x` satisfies the `Record` type. * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * @@ -661,7 +673,7 @@ export const is: { * Return a type predicate function that returns `true` if the type of `x` satisfies `Record`. * * Note that this function only check if the `x` satisfies the `Record` type. - * Use {@linkcode isRecordObjectOf} instead if you want to check if the `x` is an instance of `Object`. + * Use {@linkcode [is/record-object-of].isRecordObjectOf|isRecordObjectOf} instead if you want to check if the `x` is an instance of `Object`. * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * @@ -693,14 +705,14 @@ export const is: { * * It only supports modifing a predicate function annotated with `IsPredObj`, usually returned by the followings * - * - {@linkcode isIntersectionOf} - * - {@linkcode isObjectOf} - * - {@linkcode isOmitOf} - * - {@linkcode isPartialOf} - * - {@linkcode isPickOf} - * - {@linkcode isReadonlyOf} - * - {@linkcode isRequiredOf} - * - {@linkcode isStrictOf} + * - {@linkcode [is/intersection-of].isIntersectionOf|isIntersectionOf} + * - {@linkcode [is/object-of].isObjectOf|isObjectOf} + * - {@linkcode [is/omit-of].isOmitOf|isOmitOf} + * - {@linkcode [is/partial-of].isPartialOf|isPartialOf} + * - {@linkcode [is/pick-of].isPickOf|isPickOf} + * - {@linkcode [is/readonly-of].isReadonlyOf|isReadonlyOf} + * - {@linkcode [is/required-of].isRequiredOf|isRequiredOf} + * - {@linkcode [is/strict-of].isStrictOf|isStrictOf} * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * @@ -722,7 +734,7 @@ export const is: { /** * Return `true` if the type of `x` is `Set`. * - * Use {@linkcode isSetOf} to check if the type of `x` is a set of `T`. + * Use {@linkcode [is/set-of].isSetOf|isSetOf} to check if the type of `x` is a set of `T`. * * ```ts * import { is } from "@core/unknownutil"; @@ -737,7 +749,7 @@ export const is: { /** * Return a type predicate function that returns `true` if the type of `x` is `Set`. * - * Use {@linkcode isSet} to check if the type of `x` is a set of `unknown`. + * Use {@linkcode [is/set].isSet|isSet} to check if the type of `x` is a set of `unknown`. * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * @@ -757,14 +769,14 @@ export const is: { * * It only supports modifing a predicate function annotated with `IsPredObj`, usually returned by the followings * - * - {@linkcode isIntersectionOf} - * - {@linkcode isObjectOf} - * - {@linkcode isOmitOf} - * - {@linkcode isPartialOf} - * - {@linkcode isPickOf} - * - {@linkcode isReadonlyOf} - * - {@linkcode isRequiredOf} - * - {@linkcode isStrictOf} + * - {@linkcode [is/intersection-of].isIntersectionOf|isIntersectionOf} + * - {@linkcode [is/object-of].isObjectOf|isObjectOf} + * - {@linkcode [is/omit-of].isOmitOf|isOmitOf} + * - {@linkcode [is/partial-of].isPartialOf|isPartialOf} + * - {@linkcode [is/pick-of].isPickOf|isPickOf} + * - {@linkcode [is/readonly-of].isReadonlyOf|isReadonlyOf} + * - {@linkcode [is/required-of].isRequiredOf|isRequiredOf} + * - {@linkcode [is/strict-of].isStrictOf|isStrictOf} * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * @@ -812,6 +824,9 @@ export const is: { /** * Return `true` if the type of `x` is `function` (non async function). * + * Use {@linkcode [is/function].isFunction|isFunction} to check if the type of `x` is a function. + * Use {@linkcode [is/async-function].isAsyncFunction|isAsyncFunction} to check if the type of `x` is an asynchronous function. + * * ```ts * import { is } from "@core/unknownutil"; * @@ -825,7 +840,7 @@ export const is: { /** * Return a type predicate function that returns `true` if the type of `x` is `TupleOf`. * - * Use {@linkcode isUniformTupleOf} to check if the type of `x` is a tuple of uniform types. + * Use {@linkcode [is/uniform-tuple-of].isUniformTupleOf|isUniformTupleOf} to check if the type of `x` is a tuple of uniform types. * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * @@ -909,7 +924,7 @@ export const is: { /** * Return a type predicate function that returns `true` if the type of `x` is `UniformTupleOf`. * - * Use {@linkcode isTupleOf} to check if the type of `x` is a tuple of `T`. + * Use {@linkcode [is/tuple-of].isTupleOf|isTupleOf} to check if the type of `x` is a tuple of `T`. * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * @@ -939,7 +954,7 @@ export const is: { /** * Return a type predicate function that returns `true` if the type of `x` is `UnionOf`. * - * Use {@linkcode isIntersectionOf} to check if the type of `x` is an intersection of `T`. + * Use {@linkcode [is/intersection-of].isIntersectionOf|isIntersectionOf} to check if the type of `x` is an intersection of `T`. * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * @@ -971,7 +986,7 @@ export const is: { /** * Assume `x` is `unknown` and always return `true` regardless of the type of `x`. * - * Use {@linkcode isAny} to assume that the type of `x` is `any`. + * Use {@linkcode [is/any].isAny|isAny} to assume that the type of `x` is `any`. * * ```ts * import { is } from "@core/unknownutil"; diff --git a/is/null.ts b/is/null.ts index a4d8a15..b4fe65c 100644 --- a/is/null.ts +++ b/is/null.ts @@ -1,8 +1,8 @@ /** * Return `true` if the type of `x` is `null`. * - * Use {@linkcode isUndefined} to check if the type of `x` is `undefined`. - * Use {@linkcode isNullish} to check if the type of `x` is `null` or `undefined`. + * Use {@linkcode [is/undefined].isUndefined|isUndefined} to check if the type of `x` is `undefined`. + * Use {@linkcode [is/nullish].isNullish|isNullish} to check if the type of `x` is `null` or `undefined`. * * ```ts * import { is } from "@core/unknownutil"; diff --git a/is/nullish.ts b/is/nullish.ts index d462fba..eaaebb1 100644 --- a/is/nullish.ts +++ b/is/nullish.ts @@ -1,8 +1,8 @@ /** * Return `true` if the type of `x` is `null` or `undefined`. * - * Use {@linkcode isNull} to check if the type of `x` is `null`. - * Use {@linkcode isUndefined} to check if the type of `x` is `undefined`. + * Use {@linkcode [is/null].isNull|isNull} to check if the type of `x` is `null`. + * Use {@linkcode [is/undefined].isUndefined|isUndefined} to check if the type of `x` is `undefined`. * * ```ts * import { is } from "@core/unknownutil"; diff --git a/is/object_of.ts b/is/object_of.ts index 7be8ca9..0137696 100644 --- a/is/object_of.ts +++ b/is/object_of.ts @@ -11,13 +11,13 @@ import type { Predicate } from "../type.ts"; /** * Return a type predicate function that returns `true` if the type of `x` is `ObjectOf`. * - * Use {@linkcode isRecordOf} if you want to check if the type of `x` is a record of `T`. + * Use {@linkcode [is/record-of].isRecordOf|isRecordOf} if you want to check if the type of `x` is a record of `T`. * - * If {@linkcode asOptional} is specified in the predicate function in `predObj`, the property becomes optional. - * If {@linkcode asReadonly} is specified in the predicate function in `predObj`, the property becomes readonly. + * If {@linkcode [as/optional].asOptional|asOptional} is specified in the predicate function in `predObj`, the property becomes optional. + * If {@linkcode [as/readonly].asReadonly|asReadonly} is specified in the predicate function in `predObj`, the property becomes readonly. * * The number of keys of `x` must be greater than or equal to the number of keys of `predObj`. - * Use {@linkcode isStrictOf} if you want to check the exact number of keys. + * Use {@linkcode [is/strict-of].isStrictOf|isStrictOf} if you want to check the exact number of keys. * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * diff --git a/is/omit_of.ts b/is/omit_of.ts index 242b355..c60c475 100644 --- a/is/omit_of.ts +++ b/is/omit_of.ts @@ -8,14 +8,14 @@ import { isObjectOf } from "./object_of.ts"; * * It only supports modifing a predicate function annotated with `IsPredObj`, usually returned by the followings * - * - {@linkcode isIntersectionOf} - * - {@linkcode isObjectOf} - * - {@linkcode isOmitOf} - * - {@linkcode isPartialOf} - * - {@linkcode isPickOf} - * - {@linkcode isReadonlyOf} - * - {@linkcode isRequiredOf} - * - {@linkcode isStrictOf} + * - {@linkcode [is/intersection-of].isIntersectionOf|isIntersectionOf} + * - {@linkcode [is/object-of].isObjectOf|isObjectOf} + * - {@linkcode [is/omit-of].isOmitOf|isOmitOf} + * - {@linkcode [is/partial-of].isPartialOf|isPartialOf} + * - {@linkcode [is/pick-of].isPickOf|isPickOf} + * - {@linkcode [is/readonly-of].isReadonlyOf|isReadonlyOf} + * - {@linkcode [is/required-of].isRequiredOf|isRequiredOf} + * - {@linkcode [is/strict-of].isStrictOf|isStrictOf} * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * diff --git a/is/parameters_of.ts b/is/parameters_of.ts index a202ca7..39134dd 100644 --- a/is/parameters_of.ts +++ b/is/parameters_of.ts @@ -7,7 +7,8 @@ import { isArray } from "./array.ts"; /** * Return a type predicate function that returns `true` if the type of `x` is `ParametersOf` or `ParametersOf`. * - * This is similar to {@linkcode isTupleOf}, but if {@linkcode asOptional} is specified at the trailing, the trailing elements becomes optional and makes variable-length tuple. + * This is similar to {@linkcode [is/tuple].isTupleOf|isTupleOf}, but if {@linkcode [as/optional].asOptional|asOptional} + * is specified at the trailing, the trailing elements becomes optional and makes variable-length tuple. * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * diff --git a/is/partial_of.ts b/is/partial_of.ts index 56e1395..19c6e0d 100644 --- a/is/partial_of.ts +++ b/is/partial_of.ts @@ -9,14 +9,14 @@ import { isObjectOf } from "./object_of.ts"; * * It only supports modifing a predicate function annotated with `IsPredObj`, usually returned by the followings * - * - {@linkcode isIntersectionOf} - * - {@linkcode isObjectOf} - * - {@linkcode isOmitOf} - * - {@linkcode isPartialOf} - * - {@linkcode isPickOf} - * - {@linkcode isReadonlyOf} - * - {@linkcode isRequiredOf} - * - {@linkcode isStrictOf} + * - {@linkcode [is/intersection-of].isIntersectionOf|isIntersectionOf} + * - {@linkcode [is/object-of].isObjectOf|isObjectOf} + * - {@linkcode [is/omit-of].isOmitOf|isOmitOf} + * - {@linkcode [is/partial-of].isPartialOf|isPartialOf} + * - {@linkcode [is/pick-of].isPickOf|isPickOf} + * - {@linkcode [is/readonly-of].isReadonlyOf|isReadonlyOf} + * - {@linkcode [is/required-of].isRequiredOf|isRequiredOf} + * - {@linkcode [is/strict-of].isStrictOf|isStrictOf} * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * diff --git a/is/pick_of.ts b/is/pick_of.ts index 3ac46c4..32fb723 100644 --- a/is/pick_of.ts +++ b/is/pick_of.ts @@ -8,14 +8,14 @@ import { isObjectOf } from "./object_of.ts"; * * It only supports modifing a predicate function annotated with `IsPredObj`, usually returned by the followings * - * - {@linkcode isIntersectionOf} - * - {@linkcode isObjectOf} - * - {@linkcode isOmitOf} - * - {@linkcode isPartialOf} - * - {@linkcode isPickOf} - * - {@linkcode isReadonlyOf} - * - {@linkcode isRequiredOf} - * - {@linkcode isStrictOf} + * - {@linkcode [is/intersection-of].isIntersectionOf|isIntersectionOf} + * - {@linkcode [is/object-of].isObjectOf|isObjectOf} + * - {@linkcode [is/omit-of].isOmitOf|isOmitOf} + * - {@linkcode [is/partial-of].isPartialOf|isPartialOf} + * - {@linkcode [is/pick-of].isPickOf|isPickOf} + * - {@linkcode [is/readonly-of].isReadonlyOf|isReadonlyOf} + * - {@linkcode [is/required-of].isRequiredOf|isRequiredOf} + * - {@linkcode [is/strict-of].isStrictOf|isStrictOf} * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * diff --git a/is/readonly_of.ts b/is/readonly_of.ts index c9e2671..ea548bb 100644 --- a/is/readonly_of.ts +++ b/is/readonly_of.ts @@ -5,6 +5,17 @@ import type { Predicate } from "../type.ts"; /** * Return a type predicate function that returns `true` if the type of `x` is `Readonly>`. * + * It only supports modifing a predicate function annotated with `IsPredObj`, usually returned by the followings + * + * - {@linkcode [is/intersection-of].isIntersectionOf|isIntersectionOf} + * - {@linkcode [is/object-of].isObjectOf|isObjectOf} + * - {@linkcode [is/omit-of].isOmitOf|isOmitOf} + * - {@linkcode [is/partial-of].isPartialOf|isPartialOf} + * - {@linkcode [is/pick-of].isPickOf|isPickOf} + * - {@linkcode [is/readonly-of].isReadonlyOf|isReadonlyOf} + * - {@linkcode [is/required-of].isRequiredOf|isRequiredOf} + * - {@linkcode [is/strict-of].isStrictOf|isStrictOf} + * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * * ```typescript diff --git a/is/record.ts b/is/record.ts index fc691f7..318ccfa 100644 --- a/is/record.ts +++ b/is/record.ts @@ -2,7 +2,7 @@ * Return `true` if the type of `x` satisfies `Record`. * * Note that this function returns `true` for ambiguous instances like `Set`, `Map`, `Date`, `Promise`, etc. - * Use {@linkcode isRecordObject} instead if you want to check if `x` is an instance of `Object`. + * Use {@linkcode [is/record-object].isRecordObject|isRecordObject} instead if you want to check if `x` is an instance of `Object`. * * ```ts * import { is } from "@core/unknownutil"; diff --git a/is/record_object.ts b/is/record_object.ts index 2281809..86a5633 100644 --- a/is/record_object.ts +++ b/is/record_object.ts @@ -2,7 +2,7 @@ * Return `true` if the type of `x` is an object instance that satisfies `Record`. * * Note that this function check if the `x` is an instance of `Object`. - * Use {@linkcode isRecord} instead if you want to check if the `x` satisfies the `Record` type. + * Use {@linkcode [is/record].isRecord|isRecord} instead if you want to check if the `x` satisfies the `Record` type. * * ```ts * import { is } from "@core/unknownutil"; diff --git a/is/record_object_of.ts b/is/record_object_of.ts index 46d22a2..f6d3452 100644 --- a/is/record_object_of.ts +++ b/is/record_object_of.ts @@ -6,7 +6,7 @@ import { isRecordObject } from "./record_object.ts"; * Return a type predicate function that returns `true` if the type of `x` is an Object instance that satisfies `Record`. * * Note that this function check if the `x` is an instance of `Object`. - * Use {@linkcode isRecordOf} instead if you want to check if the `x` satisfies the `Record` type. + * Use {@linkcode [is/record-of].isRecordOf|isRecordOf} instead if you want to check if the `x` satisfies the `Record` type. * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * diff --git a/is/record_of.ts b/is/record_of.ts index 1d96cd2..275ef15 100644 --- a/is/record_of.ts +++ b/is/record_of.ts @@ -6,7 +6,7 @@ import { isRecord } from "./record.ts"; * Return a type predicate function that returns `true` if the type of `x` satisfies `Record`. * * Note that this function only check if the `x` satisfies the `Record` type. - * Use {@linkcode isRecordObjectOf} instead if you want to check if the `x` is an instance of `Object`. + * Use {@linkcode [is/record-object-of].isRecordObjectOf|isRecordObjectOf} instead if you want to check if the `x` is an instance of `Object`. * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * diff --git a/is/required_of.ts b/is/required_of.ts index 310ba2a..77fc75f 100644 --- a/is/required_of.ts +++ b/is/required_of.ts @@ -9,14 +9,14 @@ import { isObjectOf } from "./object_of.ts"; * * It only supports modifing a predicate function annotated with `IsPredObj`, usually returned by the followings * - * - {@linkcode isIntersectionOf} - * - {@linkcode isObjectOf} - * - {@linkcode isOmitOf} - * - {@linkcode isPartialOf} - * - {@linkcode isPickOf} - * - {@linkcode isReadonlyOf} - * - {@linkcode isRequiredOf} - * - {@linkcode isStrictOf} + * - {@linkcode [is/intersection-of].isIntersectionOf|isIntersectionOf} + * - {@linkcode [is/object-of].isObjectOf|isObjectOf} + * - {@linkcode [is/omit-of].isOmitOf|isOmitOf} + * - {@linkcode [is/partial-of].isPartialOf|isPartialOf} + * - {@linkcode [is/pick-of].isPickOf|isPickOf} + * - {@linkcode [is/readonly-of].isReadonlyOf|isReadonlyOf} + * - {@linkcode [is/required-of].isRequiredOf|isRequiredOf} + * - {@linkcode [is/strict-of].isStrictOf|isStrictOf} * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * diff --git a/is/set.ts b/is/set.ts index fe5a308..5d19dd7 100644 --- a/is/set.ts +++ b/is/set.ts @@ -1,7 +1,7 @@ /** * Return `true` if the type of `x` is `Set`. * - * Use {@linkcode isSetOf} to check if the type of `x` is a set of `T`. + * Use {@linkcode [is/set-of].isSetOf|isSetOf} to check if the type of `x` is a set of `T`. * * ```ts * import { is } from "@core/unknownutil"; diff --git a/is/set_of.ts b/is/set_of.ts index 0f45ffb..5a69102 100644 --- a/is/set_of.ts +++ b/is/set_of.ts @@ -5,7 +5,7 @@ import { isSet } from "./set.ts"; /** * Return a type predicate function that returns `true` if the type of `x` is `Set`. * - * Use {@linkcode isSet} to check if the type of `x` is a set of `unknown`. + * Use {@linkcode [is/set].isSet|isSet} to check if the type of `x` is a set of `unknown`. * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * diff --git a/is/strict_of.ts b/is/strict_of.ts index a3f50c3..0b342f3 100644 --- a/is/strict_of.ts +++ b/is/strict_of.ts @@ -7,14 +7,14 @@ import type { Predicate } from "../type.ts"; * * It only supports modifing a predicate function annotated with `IsPredObj`, usually returned by the followings * - * - {@linkcode isIntersectionOf} - * - {@linkcode isObjectOf} - * - {@linkcode isOmitOf} - * - {@linkcode isPartialOf} - * - {@linkcode isPickOf} - * - {@linkcode isReadonlyOf} - * - {@linkcode isRequiredOf} - * - {@linkcode isStrictOf} + * - {@linkcode [is/intersection-of].isIntersectionOf|isIntersectionOf} + * - {@linkcode [is/object-of].isObjectOf|isObjectOf} + * - {@linkcode [is/omit-of].isOmitOf|isOmitOf} + * - {@linkcode [is/partial-of].isPartialOf|isPartialOf} + * - {@linkcode [is/pick-of].isPickOf|isPickOf} + * - {@linkcode [is/readonly-of].isReadonlyOf|isReadonlyOf} + * - {@linkcode [is/required-of].isRequiredOf|isRequiredOf} + * - {@linkcode [is/strict-of].isStrictOf|isStrictOf} * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * diff --git a/is/sync_function.ts b/is/sync_function.ts index bf5bca4..ea22b41 100644 --- a/is/sync_function.ts +++ b/is/sync_function.ts @@ -3,6 +3,9 @@ const objectToString = Object.prototype.toString; /** * Return `true` if the type of `x` is `function` (non async function). * + * Use {@linkcode [is/function].isFunction|isFunction} to check if the type of `x` is a function. + * Use {@linkcode [is/async-function].isAsyncFunction|isAsyncFunction} to check if the type of `x` is an asynchronous function. + * * ```ts * import { is } from "@core/unknownutil"; * diff --git a/is/tuple_of.ts b/is/tuple_of.ts index 1748484..c8f4565 100644 --- a/is/tuple_of.ts +++ b/is/tuple_of.ts @@ -5,7 +5,7 @@ import { isArray } from "./array.ts"; /** * Return a type predicate function that returns `true` if the type of `x` is `TupleOf`. * - * Use {@linkcode isUniformTupleOf} to check if the type of `x` is a tuple of uniform types. + * Use {@linkcode [is/uniform-tuple-of].isUniformTupleOf|isUniformTupleOf} to check if the type of `x` is a tuple of uniform types. * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * diff --git a/is/uniform_tuple_of.ts b/is/uniform_tuple_of.ts index d007912..74581f1 100644 --- a/is/uniform_tuple_of.ts +++ b/is/uniform_tuple_of.ts @@ -5,7 +5,7 @@ import { isArray } from "./array.ts"; /** * Return a type predicate function that returns `true` if the type of `x` is `UniformTupleOf`. * - * Use {@linkcode isTupleOf} to check if the type of `x` is a tuple of `T`. + * Use {@linkcode [is/tuple-of].isTupleOf|isTupleOf} to check if the type of `x` is a tuple of `T`. * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * diff --git a/is/union_of.ts b/is/union_of.ts index 9e898ec..8dd2674 100644 --- a/is/union_of.ts +++ b/is/union_of.ts @@ -5,7 +5,7 @@ import type { Predicate } from "../type.ts"; /** * Return a type predicate function that returns `true` if the type of `x` is `UnionOf`. * - * Use {@linkcode isIntersectionOf} to check if the type of `x` is an intersection of `T`. + * Use {@linkcode [is/intersection-of].isIntersectionOf|isIntersectionOf} to check if the type of `x` is an intersection of `T`. * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * diff --git a/is/unknown.ts b/is/unknown.ts index e5de964..70f70eb 100644 --- a/is/unknown.ts +++ b/is/unknown.ts @@ -1,7 +1,7 @@ /** * Assume `x` is `unknown` and always return `true` regardless of the type of `x`. * - * Use {@linkcode isAny} to assume that the type of `x` is `any`. + * Use {@linkcode [is/any].isAny|isAny} to assume that the type of `x` is `any`. * * ```ts * import { is } from "@core/unknownutil";