Skip to content

Commit c26fa5d

Browse files
committed
fix: types, thanks @xiaoxiangmoe
1 parent 37b2bee commit c26fa5d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Opinionated collection of common JavaScript / TypeScript utils by [@antfu](https
66

77
- Tree-shakable ESM
88
- Fully typed - with TSDocs
9-
- Type utilities - `Thenable<T>` `Arrayable<T>` etc
9+
- Type utilities - `Arrayable<T>`, `ElementOf<T>`, etc.
1010

1111
> This package is designed to be used as `devDependencies` and bundled into your dist.
1212

src/types.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/**
22
* Promise, or maybe not
33
*/
4-
export type Thenable<T> = T | Promise<T>
4+
export type Awaitable<T> = T | PromiseLike<T>
55

66
/**
77
* Null or underfind whatever
88
*/
9-
export type Nullable<T> = T | null | undefined | void
9+
export type Nullable<T> = T | null | undefined
1010

1111
/**
1212
* Array, or not yet

0 commit comments

Comments
 (0)