diff --git a/types/office-js-preview/index.d.ts b/types/office-js-preview/index.d.ts index f33ef83bba..0791ddb5ce 100644 --- a/types/office-js-preview/index.d.ts +++ b/types/office-js-preview/index.d.ts @@ -1272,7 +1272,8 @@ declare namespace Office { */ interface AsyncContextOptions { /** - * A user-defined item of any type that is returned, unchanged, in the asyncContext property of the AsyncResult object that is passed to a callback. + * A user-defined item of any type that is returned, unchanged, in the `asyncContext` property of the `AsyncResult` object + * that is passed to a callback. */ asyncContext?: any } @@ -10761,10 +10762,8 @@ declare namespace Office { * * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. - * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, - * `asyncResult`, which is an `Office.AsyncResult` object. */ - displayReplyAllForm(formData: string | ReplyFormData, callback?: (asyncResult: Office.AsyncResult) => void): void; + displayReplyAllForm(formData: string | ReplyFormData): void; /** * Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment. * @@ -10786,10 +10785,8 @@ declare namespace Office { * * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. - * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, - * `asyncResult`, which is an `Office.AsyncResult` object. */ - displayReplyForm(formData: string | ReplyFormData, callback?: (asyncResult: Office.AsyncResult) => void): void; + displayReplyForm(formData: string | ReplyFormData): void; /** * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. * @@ -15082,10 +15079,8 @@ declare namespace Office { * * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. - * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, - * `asyncResult`, which is an `Office.AsyncResult` object. */ - displayReplyAllForm(formData: string | ReplyFormData, callback?: (asyncResult: Office.AsyncResult) => void): void; + displayReplyAllForm(formData: string | ReplyFormData): void; /** * Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment. * @@ -15107,10 +15102,8 @@ declare namespace Office { * * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. - * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, - * `asyncResult`, which is an `Office.AsyncResult` object. */ - displayReplyForm(formData: string | ReplyFormData, callback?: (asyncResult: Office.AsyncResult) => void): void; + displayReplyForm(formData: string | ReplyFormData): void; /** * Gets all the internet headers for the message as a string. * @@ -16405,9 +16398,14 @@ declare namespace Office { attachments?: ReplyFormAttachment[]; /** * When the reply display call completes, the function passed in the callback parameter is called with a single parameter, - * asyncResult, which is an Office.AsyncResult object. + * `asyncResult`, which is an `Office.AsyncResult` object. */ callback?: (asyncResult: Office.AsyncResult) => void; + /** + * An object literal that contains the following property. + * `asyncContext`: Developers can provide any object they wish to access in the callback method. + */ + options?: Office.AsyncContextOptions; } /** * The settings created by using the methods of the `RoamingSettings` object are saved per add-in and per user. diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index d2eeae452f..4808e476d6 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -1035,7 +1035,8 @@ declare namespace Office { */ interface AsyncContextOptions { /** - * A user-defined item of any type that is returned, unchanged, in the asyncContext property of the AsyncResult object that is passed to a callback. + * A user-defined item of any type that is returned, unchanged, in the `asyncContext` property of the `AsyncResult` object + * that is passed to a callback. */ asyncContext?: any } @@ -10341,10 +10342,8 @@ declare namespace Office { * * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. - * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, - * `asyncResult`, which is an `Office.AsyncResult` object. */ - displayReplyAllForm(formData: string | ReplyFormData, callback?: (asyncResult: Office.AsyncResult) => void): void; + displayReplyAllForm(formData: string | ReplyFormData): void; /** * Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment. * @@ -10366,10 +10365,8 @@ declare namespace Office { * * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. - * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, - * `asyncResult`, which is an `Office.AsyncResult` object. */ - displayReplyForm(formData: string | ReplyFormData, callback?: (asyncResult: Office.AsyncResult) => void): void; + displayReplyForm(formData: string | ReplyFormData): void; /** * Gets an attachment from a message or appointment and returns it as an `AttachmentContent` object. * @@ -14327,10 +14324,8 @@ declare namespace Office { * * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. - * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, - * `asyncResult`, which is an `Office.AsyncResult` object. */ - displayReplyAllForm(formData: string | ReplyFormData, callback?: (asyncResult: Office.AsyncResult) => void): void; + displayReplyAllForm(formData: string | ReplyFormData): void; /** * Displays a reply form that includes only the sender of the selected message or the organizer of the selected appointment. * @@ -14352,10 +14347,8 @@ declare namespace Office { * * @param formData - A string that contains text and HTML and that represents the body of the reply form. The string is limited to 32 KB * OR a {@link Office.ReplyFormData | ReplyFormData} object that contains body or attachment data and a callback function. - * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter, - * `asyncResult`, which is an `Office.AsyncResult` object. */ - displayReplyForm(formData: string | ReplyFormData, callback?: (asyncResult: Office.AsyncResult) => void): void; + displayReplyForm(formData: string | ReplyFormData): void; /** * Gets all the internet headers for the message as a string. * @@ -15579,9 +15572,14 @@ declare namespace Office { attachments?: ReplyFormAttachment[]; /** * When the reply display call completes, the function passed in the callback parameter is called with a single parameter, - * asyncResult, which is an Office.AsyncResult object. + * `asyncResult`, which is an `Office.AsyncResult` object. */ callback?: (asyncResult: Office.AsyncResult) => void; + /** + * An object literal that contains the following property. + * `asyncContext`: Developers can provide any object they wish to access in the callback method. + */ + options?: Office.AsyncContextOptions; } /** * The settings created by using the methods of the `RoamingSettings` object are saved per add-in and per user.