Skip to content

Commit 5f3493d

Browse files
[office-js][office-js-preview] (Common) Document how to get the Office theme in Outlook (DefinitelyTyped#73227)
1 parent 893ed62 commit 5f3493d

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7247,15 +7247,23 @@ declare namespace Office {
72477247
*
72487248
* @remarks
72497249
*
7250-
* **Important**: The `isDarkTheme` property isn't yet supported in Outlook.
7250+
* **Important**: The `isDarkTheme` property isn't supported in Outlook. To determine the current theme in Outlook,
7251+
* use the `body*Color` and `control*Color` properties instead. To automatically detect theme changes, use the
7252+
* {@link https://learn.microsoft.com/javascript/api/outlook/office.mailbox#outlook-office-mailbox-addhandlerasync-member(1) | addHandlerAsync}
7253+
* method to create an event handler for the {@link https://learn.microsoft.com/javascript/api/office/office.eventtype#fields | OfficeThemeChanged}
7254+
* event.
72517255
*/
72527256
isDarkTheme: boolean;
72537257
/**
72547258
* Gets the Office theme that's currently selected.
72557259
*
72567260
* @remarks
72577261
*
7258-
* **Important**: The `themeId` property isn't yet supported in Outlook.
7262+
* **Important**: The `themeId` property isn't supported in Outlook. To determine the current theme in Outlook,
7263+
* use the `body*Color` and `control*Color` properties instead. To automatically detect theme changes, use the
7264+
* {@link https://learn.microsoft.com/javascript/api/outlook/office.mailbox#outlook-office-mailbox-addhandlerasync-member(1) | addHandlerAsync}
7265+
* method to create an event handler for the {@link https://learn.microsoft.com/javascript/api/office/office.eventtype#fields | OfficeThemeChanged}
7266+
* event.
72597267
*/
72607268
themeId: ThemeId;
72617269
}

types/office-js/index.d.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7195,15 +7195,23 @@ declare namespace Office {
71957195
*
71967196
* @remarks
71977197
*
7198-
* **Important**: The `isDarkTheme` property isn't yet supported in Outlook.
7198+
* **Important**: The `isDarkTheme` property isn't supported in Outlook. To determine the current theme in Outlook,
7199+
* use the `body*Color` and `control*Color` properties instead. To automatically detect theme changes, use the
7200+
* {@link https://learn.microsoft.com/javascript/api/outlook/office.mailbox#outlook-office-mailbox-addhandlerasync-member(1) | addHandlerAsync}
7201+
* method to create an event handler for the {@link https://learn.microsoft.com/javascript/api/office/office.eventtype#fields | OfficeThemeChanged}
7202+
* event.
71997203
*/
72007204
isDarkTheme: boolean;
72017205
/**
72027206
* Gets the Office theme that's currently selected.
72037207
*
72047208
* @remarks
72057209
*
7206-
* **Important**: The `themeId` property isn't yet supported in Outlook.
7210+
* **Important**: The `themeId` property isn't supported in Outlook. To determine the current theme in Outlook,
7211+
* use the `body*Color` and `control*Color` properties instead. To automatically detect theme changes, use the
7212+
* {@link https://learn.microsoft.com/javascript/api/outlook/office.mailbox#outlook-office-mailbox-addhandlerasync-member(1) | addHandlerAsync}
7213+
* method to create an event handler for the {@link https://learn.microsoft.com/javascript/api/office/office.eventtype#fields | OfficeThemeChanged}
7214+
* event.
72077215
*/
72087216
themeId: ThemeId;
72097217
}

0 commit comments

Comments
 (0)