From 235072eab26a40527778755dd477cce3bcc494ae Mon Sep 17 00:00:00 2001 From: Michael Zlatkovsky Date: Thu, 24 May 2018 16:01:47 -0700 Subject: [PATCH] Improve Outlook IntelliSense experience --- types/office-js/index.d.ts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index 729b4c1bc1..a6d4375fb2 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -4645,11 +4645,6 @@ declare namespace Office { urls: Array; } export interface Item { - /** - * You can cast item with `(Item as Office.[CAST_TYPE])` where CAST_TYPE is one of the following: ItemRead, ItemCompose, Message, - * MessageRead, MessageCompose, Appointment, AppointmentRead, AppointmentCompose - */ - __BeSureToCastThisObject__: void; body: Body; itemType: Office.MailboxEnums.ItemType; notificationMessages: NotificationMessages; @@ -4925,7 +4920,11 @@ declare namespace Office { export interface Mailbox { diagnostics: Diagnostics; ewsUrl: string; - item: Item; + /** The mailbox item. Depending on the context in which the add-in opened, the item may be of any number of types. + * If you want to see IntelliSense for only a specific type, you should cast this item to one of the following: + * `ItemCompose`, `ItemRead`, `MessageCompose`, `MessageRead`, `AppointmentCompose`, `AppointmentRead` + */ + item: Item & MessageRead & MessageCompose & AppointmentRead & AppointmentCompose; userProfile: UserProfile; /** * Adds an event handler for a supported event @@ -47186,4 +47185,4 @@ declare namespace Visio { //////////////////////////////////////////////////////////////// //////////////////////// End Visio APIs //////////////////////// -////////////////////////////////////////////////////////////////Contains the host in which the add-in (web application) is running in. Possible values are: Word, Excel, PowerPoint \ No newline at end of file +////////////////////////////////////////////////////////////////