From 8f1b11a9d1024ca7b6ab194ed82e1c968a029d20 Mon Sep 17 00:00:00 2001 From: Alisue Date: Tue, 13 Feb 2024 21:31:33 +0900 Subject: [PATCH] :memo: Note that `isReadonlyOf` and related are unstable --- is/annotation.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/is/annotation.ts b/is/annotation.ts index 6062847..60f3290 100644 --- a/is/annotation.ts +++ b/is/annotation.ts @@ -93,6 +93,8 @@ type UnwrapOptionalOf = T extends /** * Return `true` if the type of predicate function `x` is annotated as `Readonly` + * + * **This is unstable and may be removed in the future.** */ export function isReadonly

>( x: P, @@ -105,6 +107,8 @@ export function isReadonly

>( /** * Return an `Readonly` annotated type predicate function that returns `true` if the type of `x` is `T`. * + * **This is unstable and may be removed in the future.** + * * Note that this function does nothing but annotate the predicate function as `Readonly`. * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. @@ -141,6 +145,8 @@ type IsReadonlyOfMetadata = { /** * Return an `Readonly` un-annotated type predicate function that returns `true` if the type of `x` is `T`. * + * **This is unstable and may be removed in the future.** + * * To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost. * * ```ts