Skip to content

Office JS internetHeaders.getAsync incorrect AsyncResult type #2448

@alexm-plutoflume

Description

@alexm-plutoflume

Type of issue

Other (describe below)

Feedback

The type signature for the getAsync method for Office JS internet headers indicates that the async result should be Record<string, string>>.

We found in Classic Outlook for Windows this method can return null if the header requested doesn't exist. The type signature does not indicate that this method can return null. The typescript typestubs provided by MSFT also do not indicate this value can be null.

For Mac, New Outlook for Windows, and Outlook on the Web, this same scenario returns an empty Record which is what we would expect.

Is this a bug with Classic Outlook for Windows?

Page URL

https://learn.microsoft.com/en-us/javascript/api/outlook/office.internetheaders?view=outlook-js-preview

Content source URL

https://github.com/OfficeDev/office-js-docs-reference/blob/live/docs/docs-ref-autogen/outlook/outlook/office.internetheaders.yml

Author

@o365devx

Document Id

bd5143a2-6f72-130c-ffed-d134ec3ec2b9

Platform Id

b95b41a3-e408-b3dc-fcab-7eda122d4924

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions