OfficeDev/office-js

Missing TypeScript definitions for Office.context.mailbox.addHandlerAsync

Closed this issue · 4 comments

The TypeScript definitions in this repo and published at @types/office-js are missing the documented Office.context.mailbox.addHandlerAsync method as well as Office.EventType.ItemChanged.

(Sorry for deleting the issue template but most of it does not really apply for this kind of issue.)

@KingHenne , thanks for bringing this up to our attention. I will forward this on to the Outlook team, but just for reference, you can always feel free to just submit a pull request on https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/office-js/index.d.ts. It is the "source of truth" for the TypeScript definitions, and will get merged in her automatically a short while after it's made it into the DefinitelyTyped repo.

I was hoping the typings for office.js are generated by the office dev team and then submitted to DefinitelyTyped. Is that not the case?

It is sorta that case, but with a bit of an asterisk.

  • For any of the "2016" wave of Office.js host-specific APIs for Word/Excel/OneNote (i.e., objects that hang off of the Excel, Word, etc. namespace), IntelliSense is 100% code-gen-ed.
  • For any of the 2013 APIs, or for Outlook (which still uses the Office.context.____Async pattern), IntelliSense is (was) manually generated. The d.ts file received somewhat less attention than the VSDOC (JavaScript IntelliSense for VS 2015 and earlier), so there may be occasional gaps, like the one you found, though we are working on closing these.

In both cases, the Office dev team (usually myself) submit updates to DefinitelyTyped and to here. But for the manually-written IntelliSense, it has to be manually written first :-)