mirror of
https://github.com/Kir-Antipov/mc-publish.git
synced 2024-11-22 00:11:02 -05:00
Made a type to indicate that await
should be used
This commit is contained in:
parent
09d0d25fdc
commit
6e27f6c851
1 changed files with 6 additions and 0 deletions
6
src/utils/types/awaitable.ts
Normal file
6
src/utils/types/awaitable.ts
Normal file
|
@ -0,0 +1,6 @@
|
|||
/**
|
||||
* Represents a type that can either be a value of type `T` or a promise of type `T`.
|
||||
*
|
||||
* @template T - The type of value that may be awaited.
|
||||
*/
|
||||
export type Awaitable<T> = T | Promise<T>;
|
Loading…
Reference in a new issue