Utility TypeScript @ 2.0.0-beta.5
GitHub
by Maddi Mathon
Preparing search index...
types
SyncOrAsync
Type Alias SyncOrAsync<T_Which, T_Value>
SyncOrAsync
:
Exactly
<
T_Which
,
"async"
>
extends
true
?
Promise
<
T_Value
>
:
Exactly
<
T_Which
,
"sync"
>
extends
true
?
T_Value
:
Promise
<
T_Value
>
|
T_Value
Dynamically declare a value as a promise or not.
Type Parameters
T_Which
extends
"async"
|
"sync"
T_Value
Since
2.0.0-beta.3
Settings
Member Visibility
Alpha
Beta
External
Inherited
Private
Protected
Theme
OS
Light
Dark
GitHub
by Maddi Mathon
Utility TypeScript @ 2.0.0-beta.5
Loading...
Dynamically declare a value as a promise or not.