We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 171c89c + cd72ada commit d328d54Copy full SHA for d328d54
compiler/packages/babel-plugin-react-compiler/src/Utils/Result.ts
@@ -124,11 +124,11 @@ class OkImpl<T> implements Result<T, never> {
124
return this;
125
}
126
127
- isOk(): boolean {
+ isOk(): this is OkImpl<T> {
128
return true;
129
130
131
- isErr(): boolean {
+ isErr(): this is ErrImpl<never> {
132
return false;
133
134
@@ -199,11 +199,11 @@ class ErrImpl<E> implements Result<never, E> {
199
return fn(this.val);
200
201
202
+ isOk(): this is OkImpl<never> {
203
204
205
206
+ isErr(): this is ErrImpl<E> {
207
208
209
0 commit comments