Skip to content

Commit d328d54

Browse files
committed
Merge branch 'fix-result-combinator-returns' into handle-satisfies-expression
2 parents 171c89c + cd72ada commit d328d54

File tree

1 file changed

+4
-4
lines changed
  • compiler/packages/babel-plugin-react-compiler/src/Utils

1 file changed

+4
-4
lines changed

compiler/packages/babel-plugin-react-compiler/src/Utils/Result.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,11 +124,11 @@ class OkImpl<T> implements Result<T, never> {
124124
return this;
125125
}
126126

127-
isOk(): boolean {
127+
isOk(): this is OkImpl<T> {
128128
return true;
129129
}
130130

131-
isErr(): boolean {
131+
isErr(): this is ErrImpl<never> {
132132
return false;
133133
}
134134

@@ -199,11 +199,11 @@ class ErrImpl<E> implements Result<never, E> {
199199
return fn(this.val);
200200
}
201201

202-
isOk(): boolean {
202+
isOk(): this is OkImpl<never> {
203203
return false;
204204
}
205205

206-
isErr(): boolean {
206+
isErr(): this is ErrImpl<E> {
207207
return true;
208208
}
209209

0 commit comments

Comments
 (0)