main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
481 bytes
|
Line | |
---|
1 | /**
|
---|
2 | * Create an asynchronous operation like the original `Promise` type but this
|
---|
3 | * one prevents promises to be wrapped within more promises (not possible).
|
---|
4 | * @param A
|
---|
5 | * @example
|
---|
6 | * ```ts
|
---|
7 | * import {A} from 'ts-toolbelt'
|
---|
8 | *
|
---|
9 | * type test0 = A.Promise<Promise<number>> // Promise<number>
|
---|
10 | * type test1 = Promise<Promise<number>> // Promise<Promise<number>>
|
---|
11 | * ```
|
---|
12 | */
|
---|
13 | export declare type Promise<A extends any> = globalThis.Promise<A extends globalThis.Promise<infer X> ? X : A>;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.