Skip to content

Commit 8f1b11a

Browse files
committed
📝 Note that isReadonlyOf and related are unstable
1 parent 55c2c68 commit 8f1b11a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

is/annotation.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ type UnwrapOptionalOf<T> = T extends
9393

9494
/**
9595
* Return `true` if the type of predicate function `x` is annotated as `Readonly`
96+
*
97+
* **This is unstable and may be removed in the future.**
9698
*/
9799
export function isReadonly<P extends Predicate<unknown>>(
98100
x: P,
@@ -105,6 +107,8 @@ export function isReadonly<P extends Predicate<unknown>>(
105107
/**
106108
* Return an `Readonly` annotated type predicate function that returns `true` if the type of `x` is `T`.
107109
*
110+
* **This is unstable and may be removed in the future.**
111+
*
108112
* Note that this function does nothing but annotate the predicate function as `Readonly`.
109113
*
110114
* 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 = {
141145
/**
142146
* Return an `Readonly` un-annotated type predicate function that returns `true` if the type of `x` is `T`.
143147
*
148+
* **This is unstable and may be removed in the future.**
149+
*
144150
* To enhance performance, users are advised to cache the return value of this function and mitigate the creation cost.
145151
*
146152
* ```ts

0 commit comments

Comments
 (0)