Skip to content

Commit ce72dcb

Browse files
[office-js-preview] (Outlook) Update delay delivery API guidance (DefinitelyTyped#65333)
* Update delay delivery API guidance * Fixes the getAsync definition
1 parent a7032dc commit ce72dcb

1 file changed

Lines changed: 18 additions & 8 deletions

File tree

types/office-js-preview/index.d.ts

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13056,11 +13056,12 @@ declare namespace Office {
1305613056
* @param options - An object literal that contains one or more of the following properties:-
1305713057
* `asyncContext`: Developers can provide any object they wish to access in the callback function.
1305813058
* @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter,
13059-
* `asyncResult`, which is an `Office.AsyncResult` object.
13059+
* `asyncResult`, which is an `Office.AsyncResult` object. The delivery date and time of a message is returned in the
13060+
* `asyncResult.value` property. If a delivery date hasn't been set on a message yet, `0` is returned instead.
1306013061
*
1306113062
* @beta
1306213063
*/
13063-
getAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult<Date>) => void): void;
13064+
getAsync(options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult<Date | 0>) => void): void;
1306413065
/**
1306513066
* Gets the delivery date and time of a message.
1306613067
*
@@ -13072,11 +13073,12 @@ declare namespace Office {
1307213073
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
1307313074
*
1307413075
* @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter,
13075-
* `asyncResult`, which is an `Office.AsyncResult` object.
13076+
* `asyncResult`, which is an `Office.AsyncResult` object. The delivery date and time of a message is returned in the
13077+
* `asyncResult.value` property. If a delivery date hasn't been set on a message yet, `0` is returned instead.
1307613078
*
1307713079
* @beta
1307813080
*/
13079-
getAsync(callback?: (asyncResult: Office.AsyncResult<Date>) => void): void;
13081+
getAsync(callback?: (asyncResult: Office.AsyncResult<Date | 0>) => void): void;
1308013082
/**
1308113083
* Sets the delivery date and time of a message.
1308213084
*
@@ -13087,11 +13089,15 @@ declare namespace Office {
1308713089
*
1308813090
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
1308913091
*
13092+
* **Errors**:
13093+
*
13094+
* - `InvalidFormatError` - The format of the specified data object is not valid.
13095+
*
1309013096
* @param datetime - The future date and time when the message should be sent.
1309113097
* @param options - An object literal that contains one or more of the following properties:-
1309213098
* `asyncContext`: Developers can provide any object they wish to access in the callback function.
13093-
* @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter
13094-
* of type Office.AsyncResult. Any errors encountered will be provided in the `asyncResult.error` property.
13099+
* @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter,
13100+
* `asyncResult`, which is an `Office.AsyncResult` object. Any errors encountered will be provided in the `asyncResult.error` property.
1309513101
*
1309613102
* @beta
1309713103
*/
@@ -13106,9 +13112,13 @@ declare namespace Office {
1310613112
*
1310713113
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Compose
1310813114
*
13115+
* **Errors**:
13116+
*
13117+
* - `InvalidFormatError` - The format of the specified data object is not valid.
13118+
*
1310913119
* @param datetime - The future date and time when the message should be sent.
13110-
* @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter
13111-
* of type Office.AsyncResult. Any errors encountered will be provided in the `asyncResult.error` property.
13120+
* @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter,
13121+
* `asyncResult`, which is an `Office.AsyncResult` object. Any errors encountered will be provided in the `asyncResult.error` property.
1311213122
*
1311313123
* @beta
1311413124
*/

0 commit comments

Comments
 (0)