From 2e2a844728d86234d54f864378912b4282630559 Mon Sep 17 00:00:00 2001 From: Dan Rumney Date: Tue, 30 Jul 2024 21:43:28 -0500 Subject: [PATCH] docs(optional): deprecate the `cast` method --- src/Optional.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Optional.ts b/src/Optional.ts index a47fe33..41973be 100644 --- a/src/Optional.ts +++ b/src/Optional.ts @@ -221,6 +221,8 @@ export class Optional { * type checking. This is generally used for up- and down-casting. * * @param guard + * + * @deprecated just use `filter` with a type guard */ cast(guard: (o: T | S) => boolean): Optional { if (this.isPresent() && guard(this.get())) {