Skip to content

Commit c863f5f

Browse files
docs(README.md): fix isDefined
1 parent 3b85261 commit c863f5f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -636,6 +636,10 @@ isClass(() => 5); // false
636636

637637
### isDefined
638638

639+
![fix][fix]
640+
641+
`4.1.2`: Fixes the return type `boolean`, which doesn't strictly indicate the `value` is defined by changing the `value` type to a generic `Type` and the return type to `value is Defined<Type>`.
642+
639643
Use `isDefined()` or `is.defined()` to check if a generic `Type` `value` is **not** an `undefined` type and is **not** equal to `undefined`.
640644

641645
```typescript

0 commit comments

Comments
 (0)