@@ -1351,6 +1351,57 @@ interface PromiseLike<T> {
1351
1351
onrejected : ( reason : any ) => TResult2 | PromiseLike < TResult2 > ) : PromiseLike < TResult1 | TResult2 > ;
1352
1352
}
1353
1353
1354
+ /**
1355
+ * Represents the completion of an asynchronous operation
1356
+ */
1357
+ interface Promise < T > {
1358
+ /**
1359
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
1360
+ * @param onfulfilled The callback to execute when the Promise is resolved.
1361
+ * @param onrejected The callback to execute when the Promise is rejected.
1362
+ * @returns A Promise for the completion of which ever callback is executed.
1363
+ */
1364
+ then ( onfulfilled ?: ( ( value : T ) => T | PromiseLike < T > ) | undefined | null , onrejected ?: ( ( reason : any ) => T | PromiseLike < T > ) | undefined | null ) : Promise < T > ;
1365
+
1366
+ /**
1367
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
1368
+ * @param onfulfilled The callback to execute when the Promise is resolved.
1369
+ * @param onrejected The callback to execute when the Promise is rejected.
1370
+ * @returns A Promise for the completion of which ever callback is executed.
1371
+ */
1372
+ then < TResult > ( onfulfilled : ( ( value : T ) => T | PromiseLike < T > ) | undefined | null , onrejected : ( reason : any ) => TResult | PromiseLike < TResult > ) : Promise < T | TResult > ;
1373
+
1374
+ /**
1375
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
1376
+ * @param onfulfilled The callback to execute when the Promise is resolved.
1377
+ * @param onrejected The callback to execute when the Promise is rejected.
1378
+ * @returns A Promise for the completion of which ever callback is executed.
1379
+ */
1380
+ then < TResult > ( onfulfilled : ( value : T ) => TResult | PromiseLike < TResult > , onrejected ?: ( ( reason : any ) => TResult | PromiseLike < TResult > ) | undefined | null ) : Promise < TResult > ;
1381
+
1382
+ /**
1383
+ * Attaches callbacks for the resolution and/or rejection of the Promise.
1384
+ * @param onfulfilled The callback to execute when the Promise is resolved.
1385
+ * @param onrejected The callback to execute when the Promise is rejected.
1386
+ * @returns A Promise for the completion of which ever callback is executed.
1387
+ */
1388
+ then < TResult1 , TResult2 > ( onfulfilled : ( value : T ) => TResult1 | PromiseLike < TResult1 > , onrejected : ( reason : any ) => TResult2 | PromiseLike < TResult2 > ) : Promise < TResult1 | TResult2 > ;
1389
+
1390
+ /**
1391
+ * Attaches a callback for only the rejection of the Promise.
1392
+ * @param onrejected The callback to execute when the Promise is rejected.
1393
+ * @returns A Promise for the completion of the callback.
1394
+ */
1395
+ catch ( onrejected ?: ( ( reason : any ) => T | PromiseLike < T > ) | undefined | null ) : Promise < T > ;
1396
+
1397
+ /**
1398
+ * Attaches a callback for only the rejection of the Promise.
1399
+ * @param onrejected The callback to execute when the Promise is rejected.
1400
+ * @returns A Promise for the completion of the callback.
1401
+ */
1402
+ catch < TResult > ( onrejected : ( reason : any ) => TResult | PromiseLike < TResult > ) : Promise < T | TResult > ;
1403
+ }
1404
+
1354
1405
interface ArrayLike < T > {
1355
1406
readonly length : number ;
1356
1407
readonly [ n : number ] : T ;
0 commit comments