Skip to content

Commit 26cd4e4

Browse files
[office-js][office-js-preview] (Outlook) Clarify attachment types and extensions (DefinitelyTyped#72357)
1 parent 9ce48a5 commit 26cd4e4

File tree

2 files changed

+69
-8
lines changed

2 files changed

+69
-8
lines changed

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

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12844,6 +12844,21 @@ declare namespace Office {
1284412844
interface AttachmentDetailsCompose {
1284512845
/**
1284612846
* Gets a value that indicates the attachment's type.
12847+
*
12848+
* @remarks
12849+
*
12850+
* **Important**:
12851+
*
12852+
* - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached using
12853+
* drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is
12854+
* returned in the `name` property. However, a message or appointment that's attached using the **Forward as Attachment** option
12855+
* is of type `Office.MailboxEnums.AttachmentType.Item`. In this case, an extension isn't returned in the `name` property.
12856+
*
12857+
* - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach File**, or
12858+
* **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file name extension isn't returned in the `name` property.
12859+
*
12860+
* - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or **Forward as Attachment** is of type
12861+
* `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property.
1284712862
*/
1284812863
attachmentType: MailboxEnums.AttachmentType | string;
1284912864
/**
@@ -12857,8 +12872,22 @@ declare namespace Office {
1285712872
/**
1285812873
* Gets the name of the attachment.
1285912874
*
12860-
* **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item",
12861-
* `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows.
12875+
* @remarks
12876+
*
12877+
* **Important**:
12878+
*
12879+
* - An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the `name` property.
12880+
*
12881+
* - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached using
12882+
* drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is
12883+
* returned in the `name` property. However, a message or appointment that's attached using the **Forward as Attachment** option
12884+
* is of type `Office.MailboxEnums.AttachmentType.Item`. In this case, an extension isn't returned in the `name` property.
12885+
*
12886+
* - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach File**, or
12887+
* **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file name extension isn't returned in the `name` property.
12888+
*
12889+
* - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or **Forward as Attachment** is of type
12890+
* `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property.
1286212891
*/
1286312892
name: string;
1286412893
/**
@@ -12909,8 +12938,9 @@ declare namespace Office {
1290912938
/**
1291012939
* Gets the name of the attachment.
1291112940
*
12912-
* **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item",
12913-
* `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows.
12941+
* @remarks
12942+
*
12943+
* **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the `name` property.
1291412944
*/
1291512945
name: string;
1291612946
/**

types/office-js/index.d.ts

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12757,6 +12757,21 @@ declare namespace Office {
1275712757
interface AttachmentDetailsCompose {
1275812758
/**
1275912759
* Gets a value that indicates the attachment's type.
12760+
*
12761+
* @remarks
12762+
*
12763+
* **Important**:
12764+
*
12765+
* - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached using
12766+
* drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is
12767+
* returned in the `name` property. However, a message or appointment that's attached using the **Forward as Attachment** option
12768+
* is of type `Office.MailboxEnums.AttachmentType.Item`. In this case, an extension isn't returned in the `name` property.
12769+
*
12770+
* - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach File**, or
12771+
* **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file name extension isn't returned in the `name` property.
12772+
*
12773+
* - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or **Forward as Attachment** is of type
12774+
* `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property.
1276012775
*/
1276112776
attachmentType: MailboxEnums.AttachmentType | string;
1276212777
/**
@@ -12770,8 +12785,23 @@ declare namespace Office {
1277012785
/**
1277112786
* Gets the name of the attachment.
1277212787
*
12773-
* **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item",
12774-
* `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows.
12788+
* @remarks
12789+
*
12790+
* **Important**:
12791+
*
12792+
* - An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the `name` property.
12793+
*
12794+
* - In Outlook on the web and new Outlook on Windows, a message or appointment that's locally saved then attached using
12795+
* drag-and-drop or the **Attach Item** option is of type `Office.MailboxEnums.AttachmentType.File`. The file name extension is
12796+
* returned in the `name` property. However, a message or appointment that's attached using the **Forward as Attachment** option
12797+
* is of type `Office.MailboxEnums.AttachmentType.Item`. In this case, an extension isn't returned in the `name` property.
12798+
*
12799+
* - In classic Outlook on Windows, a message or appointment that's attached using drag-and-drop, **Attach Item**, or
12800+
* **Forward as Attachment** is of type `Office.MailboxEnums.AttachmentType.Item`. A file name extension isn't returned in the `name` property.
12801+
* A calendar item that's attached
12802+
*
12803+
* - In Outlook on Mac, a message or appointment that's attached using drag-and-drop, **Attach Item**, or **Forward as Attachment** is of type
12804+
* `Office.MailboxEnums.AttachmentType.File`. The file name extension is returned in the `name` property.
1277512805
*/
1277612806
name: string;
1277712807
/**
@@ -12822,8 +12852,9 @@ declare namespace Office {
1282212852
/**
1282312853
* Gets the name of the attachment.
1282412854
*
12825-
* **Important**: For message or appointment items that were attached by drag-and-drop or "Attach Item",
12826-
* `name` includes a file extension in Outlook on Mac, but excludes the extension on the web or on Windows.
12855+
* @remarks
12856+
*
12857+
* **Important**: An attachment of type `Office.MailboxEnums.AttachmentType.Item` doesn't return a file name extension in the `name` property.
1282712858
*/
1282812859
name: string;
1282912860
/**

0 commit comments

Comments
 (0)