@types/office-js-preview 1.0.490 → 1.0.492

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,7 @@ This package contains type definitions for office-js-preview (https://github.com
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/office-js-preview.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Thu, 01 Aug 2024 19:07:04 GMT
11
+ * Last updated: Tue, 06 Aug 2024 18:38:34 GMT
12
12
  * Dependencies: none
13
13
 
14
14
  # Credits
@@ -3137,7 +3137,7 @@ declare namespace Office {
3137
3137
  /**
3138
3138
  * Associates the ID or name of an action with a function.
3139
3139
  *
3140
- * @param actionId The ID of an action that is defined in an extended manifest or the name of the function as specified in a **FunctionName** element in the manifest.
3140
+ * @param actionId The ID of an action that is defined in the manifest.
3141
3141
  * @param actionFunction The function that is run when the action is invoked.
3142
3142
  */
3143
3143
  associate: (actionId: string, actionFunction: (arg?: any) => void) => void;
@@ -3152,14 +3152,14 @@ declare namespace Office {
3152
3152
  *
3153
3153
  * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.1}
3154
3154
  *
3155
- * @param shortcuts An object of custom shortcuts with keys being the IDs of the actions (as defined in an extended manifest) and values being the shortcut combinations. For example, `{"SetItalic": "Ctrl+1", "SetBold": "Ctrl+2"}`.
3155
+ * @param shortcuts An object of custom shortcuts with keys being the IDs of the actions and values being the shortcut combinations. For example, `{"SetItalic": "Ctrl+1", "SetBold": "Ctrl+2"}`.
3156
3156
  * To learn how to specify a valid action ID and a key combination, see {@link https://learn.microsoft.com/office/dev/add-ins/design/keyboard-shortcuts | Add custom keyboard shortcuts to your Office Add-ins}. (Note that a key combination can be `null`, in which case, the action keeps the key combination specified in the JSON file.)
3157
3157
  * @returns A promise that resolves when every custom shortcut assignment in `shortcuts` has been registered. Even if there is a conflict with existing shortcuts, the customized shortcut will be registered.
3158
3158
  * Otherwise, the promise will be rejected with error code and error message. An "InvalidOperation" error code is returned if any action ID in `shortcuts` does not exist, or if shortcut combination is invalid.
3159
3159
  */
3160
3160
  replaceShortcuts(shortcuts: {[actionId: string]: string}): Promise<void>;
3161
3161
  /**
3162
- * Gets the existing shortcuts for the add-in. The set always includes (1) the shortcuts defined in the add-in's extended manifest for keyboard shortcuts and (2) the current user's custom shortcuts if those exist.
3162
+ * Gets the existing shortcuts for the add-in. The set always includes (1) the shortcuts defined in the add-in's manifest for keyboard shortcuts and (2) the current user's custom shortcuts if those exist.
3163
3163
  * The shortcut can be `null` if it conflicts with the shortcut of another add-in or with the Office application. Specifically, it would be `null` if, when prompted to choose which shortcut to use, the user didn't choose the action of the current add-in. For more information about conflicts with shortcuts, see {@link https://learn.microsoft.com/office/dev/add-ins/design/keyboard-shortcuts#avoid-key-combinations-in-use-by-other-add-ins | Avoid key combinations in use by other add-ins}.
3164
3164
  *
3165
3165
  * @remarks
@@ -3170,7 +3170,7 @@ declare namespace Office {
3170
3170
  *
3171
3171
  * - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.1}
3172
3172
  *
3173
- * @returns A promise that resolves to an object of shortcuts, with keys being the IDs of the actions (as defined in an extended manifest) and values being the shortcut combinations. For example, `{"SetItalic": "Ctrl+1", "SetBold": "Ctrl+2", "SetUnderline": null}`.
3173
+ * @returns A promise that resolves to an object of shortcuts, with keys being the IDs of the actions and values being the shortcut combinations. For example, `{"SetItalic": "Ctrl+1", "SetBold": "Ctrl+2", "SetUnderline": null}`.
3174
3174
  */
3175
3175
  getShortcuts(): Promise<{[actionId: string]: string|null}>;
3176
3176
  /**
@@ -8450,7 +8450,7 @@ declare namespace Office {
8450
8450
  * This method is available in the DialogApi requirement set for Excel, PowerPoint, or Word add-ins, and in the Mailbox requirement set 1.4
8451
8451
  * for Outlook. For more on how to specify a requirement set in your manifest, see
8452
8452
  * {@link https://learn.microsoft.com/office/dev/add-ins/develop/specify-office-hosts-and-api-requirements | Specify Office applications and API requirements},
8453
- * if you're using the XML manifest. If you're using the unified manifest for Microsoft 365, see
8453
+ * if you're using the add-in only manifest. If you're using the unified manifest for Microsoft 365, see
8454
8454
  * {@link https://learn.microsoft.com/office/dev/add-ins/develop/unified-manifest-overview | Office Add-ins with the unified app manifest for Microsoft 365}.
8455
8455
  *
8456
8456
  * The initial page must be on the same domain as the parent page (the startAddress parameter). After the initial page loads, you can go to
@@ -8553,7 +8553,7 @@ declare namespace Office {
8553
8553
  * This method is available in the DialogApi requirement set for Excel, PowerPoint, or Word add-ins, and in the Mailbox requirement set 1.4
8554
8554
  * for Outlook. For more on how to specify a requirement set in your manifest, see
8555
8555
  * {@link https://learn.microsoft.com/office/dev/add-ins/develop/specify-office-hosts-and-api-requirements | Specify Office applications and API requirements},
8556
- * if you're using the XML manifest. If you're using the unified manifest for Microsoft 365, see
8556
+ * if you're using the add-in only manifest. If you're using the unified manifest for Microsoft 365, see
8557
8557
  * {@link https://learn.microsoft.com/office/dev/add-ins/develop/unified-manifest-overview | Office Add-ins with the unified app manifest for Microsoft 365}.
8558
8558
  *
8559
8559
  * The initial page must be on the same domain as the parent page (the startAddress parameter). After the initial page loads, you can go to
@@ -8722,7 +8722,7 @@ declare namespace Office {
8722
8722
  * this API isn't supported in add-ins that implement a task pane. On these clients, the API is only supported in add-ins that implement event-based activation
8723
8723
  * or integrated spam reporting.
8724
8724
  *
8725
- * - If your add-in uses the XML manifest, the URL returned matches the `resid` value of the **RuntimeOverride** element of type `javascript`.
8725
+ * - If your add-in uses the add-in only manifest, the URL returned matches the `resid` value of the **RuntimeOverride** element of type `javascript`.
8726
8726
  * To learn more, see {@link https://learn.microsoft.com/javascript/api/manifest/override#override-element-for-runtime | Override element for Runtime}.
8727
8727
  *
8728
8728
  * - If your add-in uses the unified manifest for Microsoft 365, the URL returned matches the value of the `script` property in the
@@ -12154,7 +12154,7 @@ declare namespace Office {
12154
12154
  */
12155
12155
  getEntitiesByType(entityType: MailboxEnums.EntityType | string): Array<string | Contact | MeetingSuggestion | PhoneNumber | TaskSuggestion>;
12156
12156
  /**
12157
- * Returns well-known entities in the selected item that pass the named filter defined in an XML manifest file.
12157
+ * Returns well-known entities in the selected item that pass the named filter defined in an add-in only manifest file.
12158
12158
  *
12159
12159
  * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported.
12160
12160
  * We recommend updating your contextual add-in to use regular expression rules as an alternative solution.
@@ -12165,7 +12165,7 @@ declare namespace Office {
12165
12165
  *
12166
12166
  * @returns
12167
12167
  * The entities that match the regular expression defined in the `ItemHasKnownEntity` rule element in the
12168
- * manifest XML file with the specified `FilterName` element value. If there's no `ItemHasKnownEntity` element in the manifest with a
12168
+ * add-in manifest file with the specified `FilterName` element value. If there's no `ItemHasKnownEntity` element in the manifest with a
12169
12169
  * `FilterName` element value that matches the `name` parameter, the method returns `null`. If the `name` parameter matches an
12170
12170
  * `ItemHasKnownEntity` element in the manifest, but there are no entities in the current item that match, the method returns an empty array.
12171
12171
  *
@@ -12214,10 +12214,10 @@ declare namespace Office {
12214
12214
  */
12215
12215
  getInitializationContextAsync(callback: (asyncResult: Office.AsyncResult<string>) => void): void;
12216
12216
  /**
12217
- * Returns string values in the selected item that match the regular expressions defined in an XML manifest file.
12217
+ * Returns string values in the selected item that match the regular expressions defined in an add-in only manifest file.
12218
12218
  *
12219
12219
  * @returns
12220
- * An object that contains arrays of strings that match the regular expressions defined in the manifest XML file.
12220
+ * An object that contains arrays of strings that match the regular expressions defined in the add-in manifest file.
12221
12221
  * The name of each array is equal to the corresponding value of the RegExName attribute of the matching `ItemHasRegularExpressionMatch` rule.
12222
12222
  * For an `ItemHasRegularExpressionMatch` rule, a matching string has to occur in the property
12223
12223
  * of the item that's specified by that rule. The `PropertyName` simple type defines the supported properties.
@@ -12248,10 +12248,10 @@ declare namespace Office {
12248
12248
  */
12249
12249
  getRegExMatches(): any;
12250
12250
  /**
12251
- * Returns string values in the selected item that match the named regular expression defined in an XML manifest file.
12251
+ * Returns string values in the selected item that match the named regular expression defined in an add-in only manifest file.
12252
12252
  *
12253
12253
  * @returns
12254
- * An array that contains the strings that match the regular expression defined in the `ItemHasRegularExpressionMatch` rule element in the manifest XML file,
12254
+ * An array that contains the strings that match the regular expression defined in the `ItemHasRegularExpressionMatch` rule element in the add-in manifest file,
12255
12255
  * with the specified `RegExName` element value.
12256
12256
  *
12257
12257
  * @remarks
@@ -12302,11 +12302,11 @@ declare namespace Office {
12302
12302
  */
12303
12303
  getSelectedEntities(): Entities;
12304
12304
  /**
12305
- * Returns string values in a highlighted match that match the regular expressions defined in an XML manifest file.
12305
+ * Returns string values in a highlighted match that match the regular expressions defined in an add-in only manifest file.
12306
12306
  * Highlighted matches apply to contextual add-ins.
12307
12307
  *
12308
12308
  * @returns
12309
- * An object that contains arrays of strings that match the regular expressions defined in the manifest XML file.
12309
+ * An object that contains arrays of strings that match the regular expressions defined in the add-in manifest file.
12310
12310
  * The name of each array is equal to the corresponding value of the `RegExName` attribute of the matching `ItemHasRegularExpressionMatch` rule.
12311
12311
  * For an `ItemHasRegularExpressionMatch` rule, a matching string has to occur in the property of the item that's specified by that rule.
12312
12312
  * The `PropertyName` simple type defines the supported properties.
@@ -18382,7 +18382,7 @@ declare namespace Office {
18382
18382
  */
18383
18383
  getEntitiesByType(entityType: MailboxEnums.EntityType | string): Array<string | Contact | MeetingSuggestion | PhoneNumber | TaskSuggestion>;
18384
18384
  /**
18385
- * Returns well-known entities in the selected item that pass the named filter defined in an XML manifest file.
18385
+ * Returns well-known entities in the selected item that pass the named filter defined in an add-in only manifest file.
18386
18386
  *
18387
18387
  * **Warning**: Entity-based contextual Outlook add-ins are now retired. However, regular expression rules are still supported.
18388
18388
  * We recommend updating your contextual add-in to use regular expression rules as an alternative solution.
@@ -18393,7 +18393,7 @@ declare namespace Office {
18393
18393
  *
18394
18394
  * @returns
18395
18395
  * The entities that match the regular expression defined in the `ItemHasKnownEntity` rule element in the
18396
- * manifest XML file with the specified `FilterName` element value. If there's no `ItemHasKnownEntity` element in the manifest with a
18396
+ * add-in manifest file with the specified `FilterName` element value. If there's no `ItemHasKnownEntity` element in the manifest with a
18397
18397
  * `FilterName` element value that matches the `name` parameter, the method returns `null`. If the `name` parameter matches an
18398
18398
  * `ItemHasKnownEntity` element in the manifest, but there are no entities in the current item that match, the method returns an empty array.
18399
18399
  *
@@ -18442,10 +18442,10 @@ declare namespace Office {
18442
18442
  */
18443
18443
  getInitializationContextAsync(callback: (asyncResult: Office.AsyncResult<string>) => void): void;
18444
18444
  /**
18445
- * Returns string values in the selected item that match the regular expressions defined in an XML manifest file.
18445
+ * Returns string values in the selected item that match the regular expressions defined in an add-in only manifest file.
18446
18446
  *
18447
18447
  * @returns
18448
- * An object that contains arrays of strings that match the regular expressions defined in the manifest XML file.
18448
+ * An object that contains arrays of strings that match the regular expressions defined in the add-in manifest file.
18449
18449
  * The name of each array is equal to the corresponding value of the RegExName attribute of the matching `ItemHasRegularExpressionMatch` rule.
18450
18450
  * For an `ItemHasRegularExpressionMatch` rule, a matching string has to occur in the property
18451
18451
  * of the item that's specified by that rule. The `PropertyName` simple type defines the supported properties.
@@ -18476,10 +18476,10 @@ declare namespace Office {
18476
18476
  */
18477
18477
  getRegExMatches(): any;
18478
18478
  /**
18479
- * Returns string values in the selected item that match the named regular expression defined in an XML manifest file.
18479
+ * Returns string values in the selected item that match the named regular expression defined in an add-in only manifest file.
18480
18480
  *
18481
18481
  * @returns
18482
- * An array that contains the strings that match the regular expression defined in the `ItemHasRegularExpressionMatch` rule element in the manifest XML file,
18482
+ * An array that contains the strings that match the regular expression defined in the `ItemHasRegularExpressionMatch` rule element in the add-in manifest file,
18483
18483
  * with the specified `RegExName` element value.
18484
18484
  *
18485
18485
  * @remarks
@@ -18530,11 +18530,11 @@ declare namespace Office {
18530
18530
  */
18531
18531
  getSelectedEntities(): Entities;
18532
18532
  /**
18533
- * Returns string values in a highlighted match that match the regular expressions defined in an XML manifest file.
18533
+ * Returns string values in a highlighted match that match the regular expressions defined in an add-in only manifest file.
18534
18534
  * Highlighted matches apply to contextual add-ins.
18535
18535
  *
18536
18536
  * @returns
18537
- * An object that contains arrays of strings that match the regular expressions defined in the manifest XML file.
18537
+ * An object that contains arrays of strings that match the regular expressions defined in the add-in manifest file.
18538
18538
  * The name of each array is equal to the corresponding value of the `RegExName` attribute of the matching `ItemHasRegularExpressionMatch` rule.
18539
18539
  * For an `ItemHasRegularExpressionMatch` rule, a matching string has to occur in the property of the item that's specified by that rule.
18540
18540
  * The `PropertyName` simple type defines the supported properties.
@@ -20783,7 +20783,7 @@ declare namespace Office {
20783
20783
  * The `commandId` value must match the task pane ID specified in the manifest of your add-in. The markup depends on the type of manifest your
20784
20784
  * add-in uses.
20785
20785
  *
20786
- * - **XML manifest**: The `id` attribute of the {@link https://learn.microsoft.com/javascript/api/manifest/control | Control} element representing the task pane.
20786
+ * - **Add-in only manifest**: The `id` attribute of the {@link https://learn.microsoft.com/javascript/api/manifest/control | Control} element representing the task pane.
20787
20787
  *
20788
20788
  * - **Unified manifest for Microsoft 365**: The "id" property of the task pane command in the "extensions.ribbons.tabs.groups.controls" array.
20789
20789
  *
@@ -91740,7 +91740,7 @@ declare namespace Word {
91740
91740
  /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */
91741
91741
  context: RequestContext;
91742
91742
  /**
91743
- * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's null otherwise.
91743
+ * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise.
91744
91744
  *
91745
91745
  * @remarks
91746
91746
  * [Api set: WordApi 1.7]
@@ -91762,7 +91762,7 @@ declare namespace Word {
91762
91762
  */
91763
91763
  readonly contentControls: Word.ContentControlCollection;
91764
91764
  /**
91765
- * Specifies the dropdown list-related data if the content control's type is 'DropDownList'. It's null otherwise.
91765
+ * Specifies the dropdown list-related data if the content control's type is 'DropDownList'. It's `null` otherwise.
91766
91766
  *
91767
91767
  * @remarks
91768
91768
  * [Api set: WordApi BETA (PREVIEW ONLY)]
@@ -92646,8 +92646,8 @@ declare namespace Word {
92646
92646
  * @remarks
92647
92647
  * [Api set: WordApi 1.5]
92648
92648
  *
92649
- * Note: `PlainText` support was added in WordApi 1.5. `CheckBox` support was added in WordApi 1.7.
92650
- * `DropDownList` and `ComboBox` support are currently in preview.
92649
+ * Note: 'PlainText' support was added in WordApi 1.5. 'CheckBox' support was added in WordApi 1.7.
92650
+ * 'DropDownList' and 'ComboBox' support are currently in preview.
92651
92651
  */
92652
92652
  types: Word.ContentControlType[];
92653
92653
  }
@@ -94184,7 +94184,11 @@ declare namespace Word {
94184
94184
  * @remarks
94185
94185
  * [Api set: WordApi 1.4]
94186
94186
  *
94187
- * Important: To learn more about which fields can be inserted, see the Word.Range.insertField API introduced in requirement set 1.5. Support for managing fields is similar to what's available in the Word UI. However, while the Word UI on the web primarily only supports fields as read-only (see {@link https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1 | Field codes in Word for the web}), the `Addin` field is editable. To learn more about Word UI clients that more fully support fields, see the product list at the beginning of {@link https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb | Insert, edit, and view fields in Word}.
94187
+ * Important: To learn more about which fields can be inserted, see the `Word.Range.insertField` API introduced in requirement set 1.5.
94188
+ * Support for managing fields is similar to what's available in the Word UI.
94189
+ * However, while the Word UI on the web primarily only supports fields as read-only (see {@link https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1 | Field codes in Word for the web}),
94190
+ * the `Addin` field is editable. To learn more about Word UI clients that more fully support fields,
94191
+ * see the product list at the beginning of {@link https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb | Insert, edit, and view fields in Word}.
94188
94192
  */
94189
94193
  class Field extends OfficeExtension.ClientObject {
94190
94194
  /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */
@@ -94255,7 +94259,7 @@ declare namespace Word {
94255
94259
  */
94256
94260
  code: string;
94257
94261
  /**
94258
- * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is null and it will throw a general exception when code attempts to set it.
94262
+ * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it.
94259
94263
  *
94260
94264
  * @remarks
94261
94265
  * [Api set: WordApi 1.5]
@@ -94385,7 +94389,11 @@ declare namespace Word {
94385
94389
  * @remarks
94386
94390
  * [Api set: WordApi 1.4]
94387
94391
  *
94388
- * Important: To learn more about which fields can be inserted, see the Word.Range.insertField API introduced in requirement set 1.5. Support for managing fields is similar to what's available in the Word UI. However, while the Word UI on the web primarily only supports fields as read-only (see {@link https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1 | Field codes in Word for the web}), the `Addin` field is editable. To learn more about Word UI clients that more fully support fields, see the product list at the beginning of {@link https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb | Insert, edit, and view fields in Word}.
94392
+ * Important: To learn more about which fields can be inserted, see the `Word.Range.insertField API` introduced in requirement set 1.5.
94393
+ * Support for managing fields is similar to what's available in the Word UI.
94394
+ * However, while the Word UI on the web primarily only supports fields as read-only (see {@link https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1 | Field codes in Word for the web}),
94395
+ * the `Addin` field is editable. To learn more about Word UI clients that more fully support fields,
94396
+ * see the product list at the beginning of {@link https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb | Insert, edit, and view fields in Word}.
94389
94397
  */
94390
94398
  class FieldCollection extends OfficeExtension.ClientObject {
94391
94399
  /** The request context associated with the object. This connects the add-in's process to the Office host application's process. */
@@ -94486,7 +94494,7 @@ declare namespace Word {
94486
94494
  */
94487
94495
  hidden: boolean;
94488
94496
  /**
94489
- * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or null for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font.
94497
+ * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or `null` for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font.
94490
94498
  *
94491
94499
  * @remarks
94492
94500
  * [Api set: WordApi 1.1]
@@ -97029,17 +97037,17 @@ declare namespace Word {
97029
97037
  *
97030
97038
  * Important:
97031
97039
  *
97032
- * In Word on Windows and on Mac, the API supports inserting and managing all types listed in {@link Word.FieldType} except Word.FieldType.others.
97040
+ * In Word on Windows and on Mac, the API supports inserting and managing all types listed in {@link Word.FieldType} except `Word.FieldType.others`.
97033
97041
  *
97034
97042
  * In Word on the web, the API supports inserting and managing the following field types.
97035
97043
  *
97036
- * - Word.FieldType.addin
97044
+ * - `Word.FieldType.addin`
97037
97045
  *
97038
- * - Word.FieldType.date
97046
+ * - `Word.FieldType.date`
97039
97047
  *
97040
- * - Word.FieldType.hyperlink
97048
+ * - `Word.FieldType.hyperlink`
97041
97049
  *
97042
- * - Word.FieldType.toc
97050
+ * - `Word.FieldType.toc`
97043
97051
  *
97044
97052
  * @param insertLocation Required. The location relative to the range where the field will be inserted. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'.
97045
97053
  * @param fieldType Optional. Can be any FieldType constant. The default value is Empty.
@@ -97055,17 +97063,17 @@ declare namespace Word {
97055
97063
  *
97056
97064
  * Important:
97057
97065
  *
97058
- * In Word on Windows and on Mac, the API supports inserting and managing all types listed in {@link Word.FieldType} except Word.FieldType.others.
97066
+ * In Word on Windows and on Mac, the API supports inserting and managing all types listed in {@link Word.FieldType} except `Word.FieldType.others`.
97059
97067
  *
97060
97068
  * In Word on the web, the API supports inserting and managing the following field types.
97061
97069
  *
97062
- * - Word.FieldType.addin
97070
+ * - `Word.FieldType.addin`
97063
97071
  *
97064
- * - Word.FieldType.date
97072
+ * - `Word.FieldType.date`
97065
97073
  *
97066
- * - Word.FieldType.hyperlink
97074
+ * - `Word.FieldType.hyperlink`
97067
97075
  *
97068
- * - Word.FieldType.toc
97076
+ * - `Word.FieldType.toc`
97069
97077
  *
97070
97078
  * @param insertLocation Required. The location relative to the range where the field will be inserted. The value must be 'Replace', 'Start', 'End', 'Before', or 'After'.
97071
97079
  * @param fieldType Optional. Can be any FieldType constant. The default value is Empty.
@@ -104096,7 +104104,7 @@ declare namespace Word {
104096
104104
  /** An interface for updating data on the `ContentControl` object, for use in `contentControl.set({ ... })`. */
104097
104105
  interface ContentControlUpdateData {
104098
104106
  /**
104099
- * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's null otherwise.
104107
+ * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise.
104100
104108
  *
104101
104109
  * @remarks
104102
104110
  * [Api set: WordApi 1.7]
@@ -104365,7 +104373,7 @@ declare namespace Word {
104365
104373
  */
104366
104374
  code?: string;
104367
104375
  /**
104368
- * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is null and it will throw a general exception when code attempts to set it.
104376
+ * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it.
104369
104377
  *
104370
104378
  * @remarks
104371
104379
  * [Api set: WordApi 1.5]
@@ -104423,7 +104431,7 @@ declare namespace Word {
104423
104431
  */
104424
104432
  hidden?: boolean;
104425
104433
  /**
104426
- * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or null for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font.
104434
+ * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or `null` for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font.
104427
104435
  *
104428
104436
  * @remarks
104429
104437
  * [Api set: WordApi 1.1]
@@ -105756,14 +105764,14 @@ declare namespace Word {
105756
105764
  /** An interface describing the data returned by calling `contentControl.toJSON()`. */
105757
105765
  interface ContentControlData {
105758
105766
  /**
105759
- * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's null otherwise.
105767
+ * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise.
105760
105768
  *
105761
105769
  * @remarks
105762
105770
  * [Api set: WordApi 1.7]
105763
105771
  */
105764
105772
  checkboxContentControl?: Word.Interfaces.CheckboxContentControlData;
105765
105773
  /**
105766
- * Specifies the combo box-related data if the content control's type is 'ComboBox'. It's null otherwise.
105774
+ * Specifies the combo box-related data if the content control's type is 'ComboBox'. It's `null` otherwise.
105767
105775
  *
105768
105776
  * @remarks
105769
105777
  * [Api set: WordApi BETA (PREVIEW ONLY)]
@@ -105778,7 +105786,7 @@ declare namespace Word {
105778
105786
  */
105779
105787
  contentControls?: Word.Interfaces.ContentControlData[];
105780
105788
  /**
105781
- * Specifies the dropdown list-related data if the content control's type is 'DropDownList'. It's null otherwise.
105789
+ * Specifies the dropdown list-related data if the content control's type is 'DropDownList'. It's `null` otherwise.
105782
105790
  *
105783
105791
  * @remarks
105784
105792
  * [Api set: WordApi BETA (PREVIEW ONLY)]
@@ -106283,7 +106291,7 @@ declare namespace Word {
106283
106291
  */
106284
106292
  code?: string;
106285
106293
  /**
106286
- * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is null and it will throw a general exception when code attempts to set it.
106294
+ * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it.
106287
106295
  *
106288
106296
  * @remarks
106289
106297
  * [Api set: WordApi 1.5]
@@ -106355,7 +106363,7 @@ declare namespace Word {
106355
106363
  */
106356
106364
  hidden?: boolean;
106357
106365
  /**
106358
- * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or null for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font.
106366
+ * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or `null` for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font.
106359
106367
  *
106360
106368
  * @remarks
106361
106369
  * [Api set: WordApi 1.1]
@@ -108289,7 +108297,7 @@ declare namespace Word {
108289
108297
  */
108290
108298
  $all?: boolean;
108291
108299
  /**
108292
- * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's null otherwise.
108300
+ * Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise.
108293
108301
  *
108294
108302
  * @remarks
108295
108303
  * [Api set: WordApi 1.7]
@@ -108464,7 +108472,7 @@ declare namespace Word {
108464
108472
  */
108465
108473
  $all?: boolean;
108466
108474
  /**
108467
- * For EACH ITEM in the collection: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's null otherwise.
108475
+ * For EACH ITEM in the collection: Specifies the checkbox-related data if the content control's type is 'CheckBox'. It's `null` otherwise.
108468
108476
  *
108469
108477
  * @remarks
108470
108478
  * [Api set: WordApi 1.7]
@@ -109054,6 +109062,12 @@ declare namespace Word {
109054
109062
  *
109055
109063
  * @remarks
109056
109064
  * [Api set: WordApi 1.4]
109065
+ *
109066
+ * Important: To learn more about which fields can be inserted, see the `Word.Range.insertField` API introduced in requirement set 1.5.
109067
+ * Support for managing fields is similar to what's available in the Word UI.
109068
+ * However, while the Word UI on the web primarily only supports fields as read-only (see {@link https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1 | Field codes in Word for the web}),
109069
+ * the `Addin` field is editable. To learn more about Word UI clients that more fully support fields,
109070
+ * see the product list at the beginning of {@link https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb | Insert, edit, and view fields in Word}.
109057
109071
  */
109058
109072
  interface FieldLoadOptions {
109059
109073
  /**
@@ -109126,7 +109140,7 @@ declare namespace Word {
109126
109140
  */
109127
109141
  code?: boolean;
109128
109142
  /**
109129
- * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is null and it will throw a general exception when code attempts to set it.
109143
+ * Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it.
109130
109144
  *
109131
109145
  * @remarks
109132
109146
  * [Api set: WordApi 1.5]
@@ -109167,6 +109181,12 @@ declare namespace Word {
109167
109181
  *
109168
109182
  * @remarks
109169
109183
  * [Api set: WordApi 1.4]
109184
+ *
109185
+ * Important: To learn more about which fields can be inserted, see the `Word.Range.insertField API` introduced in requirement set 1.5.
109186
+ * Support for managing fields is similar to what's available in the Word UI.
109187
+ * However, while the Word UI on the web primarily only supports fields as read-only (see {@link https://support.microsoft.com/office/d8f46094-13c3-4966-98c3-259748f3caf1 | Field codes in Word for the web}),
109188
+ * the `Addin` field is editable. To learn more about Word UI clients that more fully support fields,
109189
+ * see the product list at the beginning of {@link https://support.microsoft.com/office/c429bbb0-8669-48a7-bd24-bab6ba6b06bb | Insert, edit, and view fields in Word}.
109170
109190
  */
109171
109191
  interface FieldCollectionLoadOptions {
109172
109192
  /**
@@ -109239,7 +109259,7 @@ declare namespace Word {
109239
109259
  */
109240
109260
  code?: boolean;
109241
109261
  /**
109242
- * For EACH ITEM in the collection: Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is null and it will throw a general exception when code attempts to set it.
109262
+ * For EACH ITEM in the collection: Specifies data in an "Addin" field. If the field isn't an "Addin" field, it is `null` and it will throw a general exception when code attempts to set it.
109243
109263
  *
109244
109264
  * @remarks
109245
109265
  * [Api set: WordApi 1.5]
@@ -109316,7 +109336,7 @@ declare namespace Word {
109316
109336
  */
109317
109337
  hidden?: boolean;
109318
109338
  /**
109319
- * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or null for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font.
109339
+ * Specifies the highlight color. To set it, use a value either in the '#RRGGBB' format or the color name. To remove highlight color, set it to null. The returned highlight color can be in the '#RRGGBB' format, an empty string for mixed highlight colors, or `null` for no highlight color. Note: Only the default highlight colors are available in Office for Windows Desktop. These are "Yellow", "Lime", "Turquoise", "Pink", "Blue", "Red", "DarkBlue", "Teal", "Green", "Purple", "DarkRed", "Olive", "Gray", "LightGray", and "Black". When the add-in runs in Office for Windows Desktop, any other color is converted to the closest color when applied to the font.
109320
109340
  *
109321
109341
  * @remarks
109322
109342
  * [Api set: WordApi 1.1]
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/office-js-preview",
3
- "version": "1.0.490",
3
+ "version": "1.0.492",
4
4
  "description": "TypeScript definitions for office-js-preview",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/office-js-preview",
6
6
  "license": "MIT",
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "scripts": {},
47
47
  "dependencies": {},
48
- "typesPublisherContentHash": "d3e26ddac1b2e57f9e9c00e195abd17791941f05910726831df346c22f61e218",
48
+ "typesPublisherContentHash": "8f7259c5c83e3aade6f58bf2eedc83e22a9d59a42739f5cd89e6d20680dcc9a0",
49
49
  "typeScriptVersion": "4.8",
50
50
  "nonNpm": true
51
51
  }