@types/office-js-preview 1.0.689 → 1.0.691
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.
- office-js-preview/README.md +1 -1
- office-js-preview/index.d.ts +83 -83
- office-js-preview/package.json +2 -2
office-js-preview/README.md
CHANGED
|
@@ -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:
|
|
11
|
+
* Last updated: Wed, 25 Feb 2026 22:44:16 GMT
|
|
12
12
|
* Dependencies: none
|
|
13
13
|
|
|
14
14
|
# Credits
|
office-js-preview/index.d.ts
CHANGED
|
@@ -434,50 +434,50 @@ declare namespace Office {
|
|
|
434
434
|
/**
|
|
435
435
|
* Return or set data as text (string). Data is returned or set as a one-dimensional run of characters.
|
|
436
436
|
*/
|
|
437
|
-
Text,
|
|
437
|
+
Text = "text",
|
|
438
438
|
/**
|
|
439
439
|
* Return or set data as tabular data with no headers. Data is returned or set as an array of arrays containing one-dimensional runs of
|
|
440
440
|
* characters. For example, three rows of string values in two columns would be: [["R1C1", "R1C2"], ["R2C1", "R2C2"], ["R3C1", "R3C2"]].
|
|
441
441
|
*
|
|
442
442
|
* **Note**: Only applies to data in Excel and Word.
|
|
443
443
|
*/
|
|
444
|
-
Matrix,
|
|
444
|
+
Matrix = "matrix",
|
|
445
445
|
/**
|
|
446
446
|
* Return or set data as tabular data with optional headers. Data is returned or set as an array of arrays with optional headers.
|
|
447
447
|
*
|
|
448
448
|
* **Note**: Only applies to data in Excel and Word.
|
|
449
449
|
*/
|
|
450
|
-
Table,
|
|
450
|
+
Table = "table",
|
|
451
451
|
/**
|
|
452
452
|
* Return or set data as HTML.
|
|
453
453
|
*
|
|
454
454
|
* **Note**: Only applies to data in add-ins for Word and Outlook add-ins for Outlook (compose mode).
|
|
455
455
|
*/
|
|
456
|
-
Html,
|
|
456
|
+
Html = "html",
|
|
457
457
|
/**
|
|
458
458
|
* Return or set data as Office Open XML.
|
|
459
459
|
*
|
|
460
460
|
* **Note**: Only applies to data in Word.
|
|
461
461
|
*/
|
|
462
|
-
Ooxml,
|
|
462
|
+
Ooxml = "ooxml",
|
|
463
463
|
/**
|
|
464
464
|
* Return a JSON object that contains an array of the IDs, titles, and indexes of the selected slides. For example,
|
|
465
465
|
* `{"slides":[{"id":257,"title":"Slide 2","index":2},{"id":256,"title":"Slide 1","index":1}]}` for a selection of two slides.
|
|
466
466
|
*
|
|
467
|
-
* **Note**: Only applies to data in PowerPoint when calling the {@link Office.Document | Document}.
|
|
467
|
+
* **Note**: Only applies to data in PowerPoint when calling the {@link Office.Document | Document}.getSelectedDataAsync method to get the current
|
|
468
468
|
* slide or selected range of slides.
|
|
469
469
|
*/
|
|
470
|
-
SlideRange,
|
|
470
|
+
SlideRange = "slideRange",
|
|
471
471
|
/**
|
|
472
472
|
* Data is returned or set as an image stream.
|
|
473
473
|
* **Note**: Only applies to data in Excel, Word, and PowerPoint.
|
|
474
474
|
*/
|
|
475
|
-
Image,
|
|
475
|
+
Image = "image",
|
|
476
476
|
/**
|
|
477
477
|
* Data is returned or set as XML data containing an SVG image.
|
|
478
478
|
* **Note**: Only applies to data in Excel, Word, and PowerPoint.
|
|
479
479
|
*/
|
|
480
|
-
XmlSvg
|
|
480
|
+
XmlSvg = "xmlSvg"
|
|
481
481
|
}
|
|
482
482
|
/**
|
|
483
483
|
* Specifies the type of the XML node.
|
|
@@ -607,7 +607,7 @@ declare namespace Office {
|
|
|
607
607
|
/**
|
|
608
608
|
* Occurs when data within the binding is changed in Excel or Word.
|
|
609
609
|
*
|
|
610
|
-
* To add an event handler for the BindingDataChanged event of a binding, use the addHandlerAsync method of the Binding object.
|
|
610
|
+
* To add an event handler for the `BindingDataChanged` event of a binding, use the `addHandlerAsync` method of the `Binding` object.
|
|
611
611
|
* The event handler receives an argument of type {@link Office.BindingDataChangedEventArgs}.
|
|
612
612
|
*/
|
|
613
613
|
BindingDataChanged,
|
|
@@ -3227,7 +3227,7 @@ declare namespace Office {
|
|
|
3227
3227
|
*
|
|
3228
3228
|
* - {@link https://learn.microsoft.com/javascript/api/requirement-sets/common/shared-runtime-requirement-sets | SharedRuntime 1.1}
|
|
3229
3229
|
*
|
|
3230
|
-
* @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}`.
|
|
3230
|
+
* @returns A promise that resolves to an object of shortcuts, with keys being the IDs of the actions (as defined in a manifest) and values being the shortcut combinations. For example, `{"SetItalic": "Ctrl+1", "SetBold": "Ctrl+2", "SetUnderline": null}`.
|
|
3231
3231
|
*/
|
|
3232
3232
|
getShortcuts(): Promise<{[actionId: string]: string|null}>;
|
|
3233
3233
|
/**
|
|
@@ -3740,7 +3740,7 @@ declare namespace Office {
|
|
|
3740
3740
|
forMSGraphAccess?: boolean;
|
|
3741
3741
|
}
|
|
3742
3742
|
/**
|
|
3743
|
-
* Represents the user information which can be passed to
|
|
3743
|
+
* Represents the user information which can be passed to the Microsoft Authentication Library for JavaScript (MSAL.js).
|
|
3744
3744
|
*/
|
|
3745
3745
|
interface AuthContext {
|
|
3746
3746
|
/**
|
|
@@ -5934,7 +5934,7 @@ declare namespace Office {
|
|
|
5934
5934
|
*/
|
|
5935
5935
|
getFilePropertiesAsync(callback?: (result: AsyncResult<Office.FileProperties>) => void): void;
|
|
5936
5936
|
/**
|
|
5937
|
-
* Reads the data contained in the current selection in the document.
|
|
5937
|
+
* Reads the data contained in the current selection in the document using the `Text` coercion type.
|
|
5938
5938
|
*
|
|
5939
5939
|
* @remarks
|
|
5940
5940
|
*
|
|
@@ -5946,7 +5946,7 @@ declare namespace Office {
|
|
|
5946
5946
|
*
|
|
5947
5947
|
* **Supported applications**: Excel, PowerPoint, Project, Word
|
|
5948
5948
|
*
|
|
5949
|
-
* In the callback function that
|
|
5949
|
+
* In the `callback` function that's passed to the `getSelectedDataAsync` method, you can use the properties of the `AsyncResult` object to return
|
|
5950
5950
|
* the following information.
|
|
5951
5951
|
*
|
|
5952
5952
|
* <table>
|
|
@@ -5956,7 +5956,7 @@ declare namespace Office {
|
|
|
5956
5956
|
* </tr>
|
|
5957
5957
|
* <tr>
|
|
5958
5958
|
* <td><code>AsyncResult.value</code></td>
|
|
5959
|
-
* <td>Access the selected data as a string. If the selection
|
|
5959
|
+
* <td>Access the selected data as a string. If the selection doesn't contain text, returns an empty string.</td>
|
|
5960
5960
|
* </tr>
|
|
5961
5961
|
* <tr>
|
|
5962
5962
|
* <td><code>AsyncResult.status</code></td>
|
|
@@ -5964,24 +5964,24 @@ declare namespace Office {
|
|
|
5964
5964
|
* </tr>
|
|
5965
5965
|
* <tr>
|
|
5966
5966
|
* <td><code>AsyncResult.error</code></td>
|
|
5967
|
-
* <td>Access an Error object that provides error information if the operation failed.</td>
|
|
5967
|
+
* <td>Access an <code>Error</code> object that provides error information if the operation failed.</td>
|
|
5968
5968
|
* </tr>
|
|
5969
5969
|
* <tr>
|
|
5970
5970
|
* <td><code>AsyncResult.asyncContext</code></td>
|
|
5971
|
-
* <td>Define an item of any type that's returned in the AsyncResult object without being altered.</td>
|
|
5971
|
+
* <td>Define an item of any type that's returned in the <code>AsyncResult</code> object without being altered.</td>
|
|
5972
5972
|
* </tr>
|
|
5973
5973
|
* </table>
|
|
5974
5974
|
*
|
|
5975
5975
|
* @param coercionType Must be `Office.CoercionType.Text`.
|
|
5976
5976
|
*
|
|
5977
|
-
* @param options Provides options for customizing what data is returned and how it
|
|
5977
|
+
* @param options Provides options for customizing what data is returned and how it's formatted.
|
|
5978
5978
|
*
|
|
5979
|
-
* @param callback Optional. A function that
|
|
5979
|
+
* @param callback Optional. A function that's invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}.
|
|
5980
5980
|
* The `value` property of the result is a string containing the selected text.
|
|
5981
5981
|
*/
|
|
5982
5982
|
getSelectedDataAsync(coercionType: Office.CoercionType.Text, options?: GetSelectedDataOptions, callback?: (result: AsyncResult<string>) => void): void;
|
|
5983
5983
|
/**
|
|
5984
|
-
* Reads the data contained in the current selection in the document.
|
|
5984
|
+
* Reads the data contained in the current selection in the document using the `Table` coercion type.
|
|
5985
5985
|
*
|
|
5986
5986
|
* @remarks
|
|
5987
5987
|
*
|
|
@@ -5993,7 +5993,7 @@ declare namespace Office {
|
|
|
5993
5993
|
*
|
|
5994
5994
|
* **Supported applications**: Excel, Word
|
|
5995
5995
|
*
|
|
5996
|
-
* In the callback function that
|
|
5996
|
+
* In the `callback` function that's passed to the `getSelectedDataAsync` method, you can use the properties of the `AsyncResult` object to return
|
|
5997
5997
|
* the following information.
|
|
5998
5998
|
*
|
|
5999
5999
|
* <table>
|
|
@@ -6003,7 +6003,7 @@ declare namespace Office {
|
|
|
6003
6003
|
* </tr>
|
|
6004
6004
|
* <tr>
|
|
6005
6005
|
* <td><code>AsyncResult.value</code></td>
|
|
6006
|
-
* <td>Access the selected data as a {@link Office.TableData} object. Returns null if no table is selected.</td>
|
|
6006
|
+
* <td>Access the selected data as a {@link Office.TableData} object. Returns `null` if no table is selected.</td>
|
|
6007
6007
|
* </tr>
|
|
6008
6008
|
* <tr>
|
|
6009
6009
|
* <td><code>AsyncResult.status</code></td>
|
|
@@ -6011,22 +6011,22 @@ declare namespace Office {
|
|
|
6011
6011
|
* </tr>
|
|
6012
6012
|
* <tr>
|
|
6013
6013
|
* <td><code>AsyncResult.error</code></td>
|
|
6014
|
-
* <td>Access an Error object that provides error information if the operation failed.</td>
|
|
6014
|
+
* <td>Access an <code>Error</code> object that provides error information if the operation failed.</td>
|
|
6015
6015
|
* </tr>
|
|
6016
6016
|
* <tr>
|
|
6017
6017
|
* <td><code>AsyncResult.asyncContext</code></td>
|
|
6018
|
-
* <td>Define an item of any type that's returned in the AsyncResult object without being altered.</td>
|
|
6018
|
+
* <td>Define an item of any type that's returned in the <code>AsyncResult</code> object without being altered.</td>
|
|
6019
6019
|
* </tr>
|
|
6020
6020
|
* </table>
|
|
6021
6021
|
*
|
|
6022
6022
|
* @param coercionType Must be `Office.CoercionType.Table`.
|
|
6023
|
-
* @param options Provides options for customizing what data is returned and how it
|
|
6024
|
-
* @param callback Optional. A function that
|
|
6023
|
+
* @param options Provides options for customizing what data is returned and how it's formatted.
|
|
6024
|
+
* @param callback Optional. A function that's invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}.
|
|
6025
6025
|
* The `value` property of the result is a {@link Office.TableData} object containing the data in the current selection.
|
|
6026
6026
|
*/
|
|
6027
6027
|
getSelectedDataAsync(coercionType: Office.CoercionType.Table, options?: GetSelectedDataOptions, callback?: (result: AsyncResult<TableData>) => void): void;
|
|
6028
6028
|
/**
|
|
6029
|
-
* Reads the data contained in the current selection in the document.
|
|
6029
|
+
* Reads the data contained in the current selection in the document using the `Matrix` coercion type.
|
|
6030
6030
|
*
|
|
6031
6031
|
* @remarks
|
|
6032
6032
|
*
|
|
@@ -6038,7 +6038,7 @@ declare namespace Office {
|
|
|
6038
6038
|
*
|
|
6039
6039
|
* **Supported applications**: Excel, Word
|
|
6040
6040
|
*
|
|
6041
|
-
* In the callback function that
|
|
6041
|
+
* In the `callback` function that's passed to the `getSelectedDataAsync` method, you can use the properties of the `AsyncResult` object to return
|
|
6042
6042
|
* the following information.
|
|
6043
6043
|
*
|
|
6044
6044
|
* <table>
|
|
@@ -6056,22 +6056,22 @@ declare namespace Office {
|
|
|
6056
6056
|
* </tr>
|
|
6057
6057
|
* <tr>
|
|
6058
6058
|
* <td><code>AsyncResult.error</code></td>
|
|
6059
|
-
* <td>Access an Error object that provides error information if the operation failed.</td>
|
|
6059
|
+
* <td>Access an <code>Error</code> object that provides error information if the operation failed.</td>
|
|
6060
6060
|
* </tr>
|
|
6061
6061
|
* <tr>
|
|
6062
6062
|
* <td><code>AsyncResult.asyncContext</code></td>
|
|
6063
|
-
* <td>Define an item of any type that's returned in the AsyncResult object without being altered.</td>
|
|
6063
|
+
* <td>Define an item of any type that's returned in the <code>AsyncResult</code> object without being altered.</td>
|
|
6064
6064
|
* </tr>
|
|
6065
6065
|
* </table>
|
|
6066
6066
|
*
|
|
6067
6067
|
* @param coercionType Must be `Office.CoercionType.Matrix`.
|
|
6068
|
-
* @param options Provides options for customizing what data is returned and how it
|
|
6069
|
-
* @param callback Optional. A function that
|
|
6068
|
+
* @param options Provides options for customizing what data is returned and how it's formatted.
|
|
6069
|
+
* @param callback Optional. A function that's invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}.
|
|
6070
6070
|
* The `value` property of the result is an array of arrays containing the data in the current selection.
|
|
6071
6071
|
*/
|
|
6072
6072
|
getSelectedDataAsync(coercionType: Office.CoercionType.Matrix, options?: GetSelectedDataOptions, callback?: (result: AsyncResult<any[][]>) => void): void;
|
|
6073
6073
|
/**
|
|
6074
|
-
* Reads the data contained in the current selection in the document.
|
|
6074
|
+
* Reads the data contained in the current selection in the document using the `SlideRange` coercion type.
|
|
6075
6075
|
*
|
|
6076
6076
|
* @remarks
|
|
6077
6077
|
*
|
|
@@ -6079,7 +6079,7 @@ declare namespace Office {
|
|
|
6079
6079
|
*
|
|
6080
6080
|
* **Supported application**: PowerPoint
|
|
6081
6081
|
*
|
|
6082
|
-
* In the callback function that
|
|
6082
|
+
* In the `callback` function that's passed to the `getSelectedDataAsync` method, you can use the properties of the `AsyncResult` object to return
|
|
6083
6083
|
* the following information.
|
|
6084
6084
|
*
|
|
6085
6085
|
* <table>
|
|
@@ -6097,17 +6097,17 @@ declare namespace Office {
|
|
|
6097
6097
|
* </tr>
|
|
6098
6098
|
* <tr>
|
|
6099
6099
|
* <td><code>AsyncResult.error</code></td>
|
|
6100
|
-
* <td>Access an Error object that provides error information if the operation failed.</td>
|
|
6100
|
+
* <td>Access an <code>Error</code> object that provides error information if the operation failed.</td>
|
|
6101
6101
|
* </tr>
|
|
6102
6102
|
* <tr>
|
|
6103
6103
|
* <td><code>AsyncResult.asyncContext</code></td>
|
|
6104
|
-
* <td>Define an item of any type that's returned in the AsyncResult object without being altered.</td>
|
|
6104
|
+
* <td>Define an item of any type that's returned in the <code>AsyncResult</code> object without being altered.</td>
|
|
6105
6105
|
* </tr>
|
|
6106
6106
|
* </table>
|
|
6107
6107
|
*
|
|
6108
6108
|
* @param coercionType Must be `Office.CoercionType.SlideRange`.
|
|
6109
|
-
* @param options Provides options for customizing what data is returned and how it
|
|
6110
|
-
* @param callback Optional. A function that
|
|
6109
|
+
* @param options Provides options for customizing what data is returned and how it's formatted.
|
|
6110
|
+
* @param callback Optional. A function that's invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}.
|
|
6111
6111
|
* The `value` property of the result is a {@link Office.SlideRange} object containing the selected slides.
|
|
6112
6112
|
*/
|
|
6113
6113
|
getSelectedDataAsync(coercionType: Office.CoercionType.SlideRange, options?: GetSelectedDataOptions, callback?: (result: AsyncResult<SlideRange>) => void): void;
|
|
@@ -6167,7 +6167,7 @@ declare namespace Office {
|
|
|
6167
6167
|
* </tr>
|
|
6168
6168
|
* </table>
|
|
6169
6169
|
*
|
|
6170
|
-
* In the callback function that
|
|
6170
|
+
* In the `callback` function that's passed to the `getSelectedDataAsync` method, you can use the properties of the `AsyncResult` object to return
|
|
6171
6171
|
* the following information.
|
|
6172
6172
|
*
|
|
6173
6173
|
* <table>
|
|
@@ -6177,7 +6177,7 @@ declare namespace Office {
|
|
|
6177
6177
|
* </tr>
|
|
6178
6178
|
* <tr>
|
|
6179
6179
|
* <td><code>AsyncResult.value</code></td>
|
|
6180
|
-
* <td>Access the selected data. The type depends on the coercionType parameter specified in the call.</td>
|
|
6180
|
+
* <td>Access the selected data. The type depends on the <code>coercionType</code> parameter specified in the call.</td>
|
|
6181
6181
|
* </tr>
|
|
6182
6182
|
* <tr>
|
|
6183
6183
|
* <td><code>AsyncResult.status</code></td>
|
|
@@ -6185,27 +6185,27 @@ declare namespace Office {
|
|
|
6185
6185
|
* </tr>
|
|
6186
6186
|
* <tr>
|
|
6187
6187
|
* <td><code>AsyncResult.error</code></td>
|
|
6188
|
-
* <td>Access an Error object that provides error information if the operation failed.</td>
|
|
6188
|
+
* <td>Access an <code>Error</code> object that provides error information if the operation failed.</td>
|
|
6189
6189
|
* </tr>
|
|
6190
6190
|
* <tr>
|
|
6191
6191
|
* <td><code>AsyncResult.asyncContext</code></td>
|
|
6192
|
-
* <td>Define an item of any type that's returned in the AsyncResult object without being altered.</td>
|
|
6192
|
+
* <td>Define an item of any type that's returned in the <code>AsyncResult</code> object without being altered.</td>
|
|
6193
6193
|
* </tr>
|
|
6194
6194
|
* </table>
|
|
6195
6195
|
*
|
|
6196
|
-
* For other coercion types or when the coercion type
|
|
6196
|
+
* For other coercion types or when the coercion type isn't known at compile time, use the generic version of this method
|
|
6197
6197
|
* and specify the type parameter explicitly.
|
|
6198
6198
|
*
|
|
6199
6199
|
* @param coercionType The type of data structure to return. See the Remarks section for each application's supported coercion types.
|
|
6200
|
-
* @param options Provides options for customizing what data is returned and how it
|
|
6201
|
-
* @param callback Optional. A function that
|
|
6200
|
+
* @param options Provides options for customizing what data is returned and how it's formatted.
|
|
6201
|
+
* @param callback Optional. A function that's invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}.
|
|
6202
6202
|
* The `value` property of the result is the data in the current selection.
|
|
6203
|
-
* This is returned in the data structure or format you specified with the coercionType parameter.
|
|
6203
|
+
* This is returned in the data structure or format you specified with the `coercionType` parameter.
|
|
6204
6204
|
* (See Remarks for more information about data coercion.)
|
|
6205
6205
|
*/
|
|
6206
6206
|
getSelectedDataAsync<T>(coercionType: Office.CoercionType, options?: GetSelectedDataOptions, callback?: (result: AsyncResult<T>) => void): void;
|
|
6207
6207
|
/**
|
|
6208
|
-
* Reads the data contained in the current selection in the document.
|
|
6208
|
+
* Reads the data contained in the current selection in the document using the `Text` coercion type.
|
|
6209
6209
|
*
|
|
6210
6210
|
* @remarks
|
|
6211
6211
|
*
|
|
@@ -6217,7 +6217,7 @@ declare namespace Office {
|
|
|
6217
6217
|
*
|
|
6218
6218
|
* **Supported applications**: Excel, PowerPoint, Project, Word
|
|
6219
6219
|
*
|
|
6220
|
-
* In the callback function that
|
|
6220
|
+
* In the `callback` function that's passed to the `getSelectedDataAsync` method, you can use the properties of the `AsyncResult` object to return
|
|
6221
6221
|
* the following information.
|
|
6222
6222
|
*
|
|
6223
6223
|
* <table>
|
|
@@ -6235,21 +6235,21 @@ declare namespace Office {
|
|
|
6235
6235
|
* </tr>
|
|
6236
6236
|
* <tr>
|
|
6237
6237
|
* <td><code>AsyncResult.error</code></td>
|
|
6238
|
-
* <td>Access an Error object that provides error information if the operation failed.</td>
|
|
6238
|
+
* <td>Access an <code>Error</code> object that provides error information if the operation failed.</td>
|
|
6239
6239
|
* </tr>
|
|
6240
6240
|
* <tr>
|
|
6241
6241
|
* <td><code>AsyncResult.asyncContext</code></td>
|
|
6242
|
-
* <td>Define an item of any type that's returned in the AsyncResult object without being altered.</td>
|
|
6242
|
+
* <td>Define an item of any type that's returned in the <code>AsyncResult</code> object without being altered.</td>
|
|
6243
6243
|
* </tr>
|
|
6244
6244
|
* </table>
|
|
6245
6245
|
*
|
|
6246
6246
|
* @param coercionType Must be `Office.CoercionType.Text`.
|
|
6247
|
-
* @param callback Optional. A function that
|
|
6247
|
+
* @param callback Optional. A function that's invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}.
|
|
6248
6248
|
* The `value` property of the result is a string containing the selected text.
|
|
6249
6249
|
*/
|
|
6250
6250
|
getSelectedDataAsync(coercionType: Office.CoercionType.Text, callback?: (result: AsyncResult<string>) => void): void;
|
|
6251
6251
|
/**
|
|
6252
|
-
* Reads the data contained in the current selection in the document.
|
|
6252
|
+
* Reads the data contained in the current selection in the document using the `Table` coercion type.
|
|
6253
6253
|
*
|
|
6254
6254
|
* @remarks
|
|
6255
6255
|
*
|
|
@@ -6261,7 +6261,7 @@ declare namespace Office {
|
|
|
6261
6261
|
*
|
|
6262
6262
|
* **Supported applications**: Excel, Word
|
|
6263
6263
|
*
|
|
6264
|
-
* In the callback function that
|
|
6264
|
+
* In the `callback` function that's passed to the `getSelectedDataAsync` method, you can use the properties of the `AsyncResult` object to return
|
|
6265
6265
|
* the following information.
|
|
6266
6266
|
*
|
|
6267
6267
|
* <table>
|
|
@@ -6271,7 +6271,7 @@ declare namespace Office {
|
|
|
6271
6271
|
* </tr>
|
|
6272
6272
|
* <tr>
|
|
6273
6273
|
* <td><code>AsyncResult.value</code></td>
|
|
6274
|
-
* <td>Access the selected data as a {@link Office.TableData} object. Returns null if no table is selected.</td>
|
|
6274
|
+
* <td>Access the selected data as a {@link Office.TableData} object. Returns `null` if no table is selected.</td>
|
|
6275
6275
|
* </tr>
|
|
6276
6276
|
* <tr>
|
|
6277
6277
|
* <td><code>AsyncResult.status</code></td>
|
|
@@ -6279,21 +6279,21 @@ declare namespace Office {
|
|
|
6279
6279
|
* </tr>
|
|
6280
6280
|
* <tr>
|
|
6281
6281
|
* <td><code>AsyncResult.error</code></td>
|
|
6282
|
-
* <td>Access an Error object that provides error information if the operation failed.</td>
|
|
6282
|
+
* <td>Access an <code>Error</code> object that provides error information if the operation failed.</td>
|
|
6283
6283
|
* </tr>
|
|
6284
6284
|
* <tr>
|
|
6285
6285
|
* <td><code>AsyncResult.asyncContext</code></td>
|
|
6286
|
-
* <td>Define an item of any type that's returned in the AsyncResult object without being altered.</td>
|
|
6286
|
+
* <td>Define an item of any type that's returned in the <code>AsyncResult</code> object without being altered.</td>
|
|
6287
6287
|
* </tr>
|
|
6288
6288
|
* </table>
|
|
6289
6289
|
*
|
|
6290
6290
|
* @param coercionType Must be `Office.CoercionType.Table`.
|
|
6291
|
-
* @param callback Optional. A function that
|
|
6291
|
+
* @param callback Optional. A function that's invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}.
|
|
6292
6292
|
* The `value` property of the result is a {@link Office.TableData} object containing the data in the current selection.
|
|
6293
6293
|
*/
|
|
6294
6294
|
getSelectedDataAsync(coercionType: Office.CoercionType.Table, callback?: (result: AsyncResult<TableData>) => void): void;
|
|
6295
6295
|
/**
|
|
6296
|
-
* Reads the data contained in the current selection in the document.
|
|
6296
|
+
* Reads the data contained in the current selection in the document using the `Matrix` coercion type.
|
|
6297
6297
|
*
|
|
6298
6298
|
* @remarks
|
|
6299
6299
|
*
|
|
@@ -6305,7 +6305,7 @@ declare namespace Office {
|
|
|
6305
6305
|
*
|
|
6306
6306
|
* **Supported applications**: Excel, Word
|
|
6307
6307
|
*
|
|
6308
|
-
* In the callback function that
|
|
6308
|
+
* In the `callback` function that's passed to the `getSelectedDataAsync` method, you can use the properties of the `AsyncResult` object to return
|
|
6309
6309
|
* the following information.
|
|
6310
6310
|
*
|
|
6311
6311
|
* <table>
|
|
@@ -6323,21 +6323,21 @@ declare namespace Office {
|
|
|
6323
6323
|
* </tr>
|
|
6324
6324
|
* <tr>
|
|
6325
6325
|
* <td><code>AsyncResult.error</code></td>
|
|
6326
|
-
* <td>Access an Error object that provides error information if the operation failed.</td>
|
|
6326
|
+
* <td>Access an <code>Error</code> object that provides error information if the operation failed.</td>
|
|
6327
6327
|
* </tr>
|
|
6328
6328
|
* <tr>
|
|
6329
6329
|
* <td><code>AsyncResult.asyncContext</code></td>
|
|
6330
|
-
* <td>Define an item of any type that's returned in the AsyncResult object without being altered.</td>
|
|
6330
|
+
* <td>Define an item of any type that's returned in the <code>AsyncResult</code> object without being altered.</td>
|
|
6331
6331
|
* </tr>
|
|
6332
6332
|
* </table>
|
|
6333
6333
|
*
|
|
6334
6334
|
* @param coercionType Must be `Office.CoercionType.Matrix`.
|
|
6335
|
-
* @param callback Optional. A function that
|
|
6335
|
+
* @param callback Optional. A function that's invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}.
|
|
6336
6336
|
* The `value` property of the result is an array of arrays containing the data in the current selection.
|
|
6337
6337
|
*/
|
|
6338
6338
|
getSelectedDataAsync(coercionType: Office.CoercionType.Matrix, callback?: (result: AsyncResult<any[][]>) => void): void;
|
|
6339
6339
|
/**
|
|
6340
|
-
* Reads the data contained in the current selection in the document.
|
|
6340
|
+
* Reads the data contained in the current selection in the document using the `SlideRange` coercion type.
|
|
6341
6341
|
*
|
|
6342
6342
|
* @remarks
|
|
6343
6343
|
*
|
|
@@ -6345,7 +6345,7 @@ declare namespace Office {
|
|
|
6345
6345
|
*
|
|
6346
6346
|
* **Supported application**: PowerPoint
|
|
6347
6347
|
*
|
|
6348
|
-
* In the callback function that
|
|
6348
|
+
* In the `callback` function that's passed to the `getSelectedDataAsync` method, you can use the properties of the `AsyncResult` object to return
|
|
6349
6349
|
* the following information.
|
|
6350
6350
|
*
|
|
6351
6351
|
* <table>
|
|
@@ -6363,16 +6363,16 @@ declare namespace Office {
|
|
|
6363
6363
|
* </tr>
|
|
6364
6364
|
* <tr>
|
|
6365
6365
|
* <td><code>AsyncResult.error</code></td>
|
|
6366
|
-
* <td>Access an Error object that provides error information if the operation failed.</td>
|
|
6366
|
+
* <td>Access an <code>Error</code> object that provides error information if the operation failed.</td>
|
|
6367
6367
|
* </tr>
|
|
6368
6368
|
* <tr>
|
|
6369
6369
|
* <td><code>AsyncResult.asyncContext</code></td>
|
|
6370
|
-
* <td>Define an item of any type that's returned in the AsyncResult object without being altered.</td>
|
|
6370
|
+
* <td>Define an item of any type that's returned in the <code>AsyncResult</code> object without being altered.</td>
|
|
6371
6371
|
* </tr>
|
|
6372
6372
|
* </table>
|
|
6373
6373
|
*
|
|
6374
6374
|
* @param coercionType Must be `Office.CoercionType.SlideRange`.
|
|
6375
|
-
* @param callback Optional. A function that
|
|
6375
|
+
* @param callback Optional. A function that's invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}.
|
|
6376
6376
|
* The `value` property of the result is a {@link Office.SlideRange} object containing the selected slides.
|
|
6377
6377
|
*/
|
|
6378
6378
|
getSelectedDataAsync(coercionType: Office.CoercionType.SlideRange, callback?: (result: AsyncResult<SlideRange>) => void): void;
|
|
@@ -6432,7 +6432,7 @@ declare namespace Office {
|
|
|
6432
6432
|
* </tr>
|
|
6433
6433
|
* </table>
|
|
6434
6434
|
*
|
|
6435
|
-
* In the callback function that
|
|
6435
|
+
* In the `callback` function that's passed to the `getSelectedDataAsync` method, you can use the properties of the `AsyncResult` object to return
|
|
6436
6436
|
* the following information.
|
|
6437
6437
|
*
|
|
6438
6438
|
* <table>
|
|
@@ -6442,7 +6442,7 @@ declare namespace Office {
|
|
|
6442
6442
|
* </tr>
|
|
6443
6443
|
* <tr>
|
|
6444
6444
|
* <td><code>AsyncResult.value</code></td>
|
|
6445
|
-
* <td>Access the selected data. The type depends on the coercionType parameter specified in the call.</td>
|
|
6445
|
+
* <td>Access the selected data. The type depends on the `coercionType` parameter specified in the call.</td>
|
|
6446
6446
|
* </tr>
|
|
6447
6447
|
* <tr>
|
|
6448
6448
|
* <td><code>AsyncResult.status</code></td>
|
|
@@ -6450,11 +6450,11 @@ declare namespace Office {
|
|
|
6450
6450
|
* </tr>
|
|
6451
6451
|
* <tr>
|
|
6452
6452
|
* <td><code>AsyncResult.error</code></td>
|
|
6453
|
-
* <td>Access an Error object that provides error information if the operation failed.</td>
|
|
6453
|
+
* <td>Access an <code>Error</code> object that provides error information if the operation failed.</td>
|
|
6454
6454
|
* </tr>
|
|
6455
6455
|
* <tr>
|
|
6456
6456
|
* <td><code>AsyncResult.asyncContext</code></td>
|
|
6457
|
-
* <td>Define an item of any type that's returned in the AsyncResult object without being altered.</td>
|
|
6457
|
+
* <td>Define an item of any type that's returned in the <code>AsyncResult</code> object without being altered.</td>
|
|
6458
6458
|
* </tr>
|
|
6459
6459
|
* </table>
|
|
6460
6460
|
*
|
|
@@ -6462,9 +6462,9 @@ declare namespace Office {
|
|
|
6462
6462
|
* and specify the type parameter explicitly.
|
|
6463
6463
|
*
|
|
6464
6464
|
* @param coercionType The type of data structure to return. See the Remarks section for each application's supported coercion types.
|
|
6465
|
-
* @param callback Optional. A function that
|
|
6465
|
+
* @param callback Optional. A function that's invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}.
|
|
6466
6466
|
* The `value` property of the result is the data in the current selection.
|
|
6467
|
-
* This is returned in the data structure or format you specified with the coercionType parameter.
|
|
6467
|
+
* This is returned in the data structure or format you specified with the `coercionType` parameter.
|
|
6468
6468
|
* (See Remarks for more information about data coercion.)
|
|
6469
6469
|
*/
|
|
6470
6470
|
getSelectedDataAsync<T>(coercionType: Office.CoercionType, callback?: (result: AsyncResult<T>) => void): void;
|
|
@@ -6590,7 +6590,7 @@ declare namespace Office {
|
|
|
6590
6590
|
* <tr>
|
|
6591
6591
|
* <td></td>
|
|
6592
6592
|
* <td></td>
|
|
6593
|
-
* <td>If
|
|
6593
|
+
* <td>If <code>data</code> is HTML, the specified HTML is inserted. (**Important**: If any of the HTML you insert is invalid, Word won't raise an error. Word will insert as much of the HTML as it can and omits any invalid data).</td>
|
|
6594
6594
|
* </tr>
|
|
6595
6595
|
* <tr>
|
|
6596
6596
|
* <td></td>
|
|
@@ -6773,7 +6773,7 @@ declare namespace Office {
|
|
|
6773
6773
|
* </tr>
|
|
6774
6774
|
* <tr>
|
|
6775
6775
|
* <td>Word</td>
|
|
6776
|
-
* <td>If there's no selection and the insertion point is at a valid location, the specified
|
|
6776
|
+
* <td>If there's no selection and the insertion point is at a valid location, the specified <code>data</code> is inserted at the insertion point</td>
|
|
6777
6777
|
* <td>If <code>data</code> is a string, the specified text is inserted.</td>
|
|
6778
6778
|
* </tr>
|
|
6779
6779
|
* <tr>
|
|
@@ -6959,7 +6959,7 @@ declare namespace Office {
|
|
|
6959
6959
|
getResourceFieldAsync(resourceId: string, fieldId: number, options?: Office.AsyncContextOptions, callback?: (result: AsyncResult<string>) => void): void;
|
|
6960
6960
|
/**
|
|
6961
6961
|
* Project documents only. Get resource field for provided resource ID. (e.g., ResourceName)
|
|
6962
|
-
* @param resourceId Either a string or value of the
|
|
6962
|
+
* @param resourceId Either a string or value of the resource ID.
|
|
6963
6963
|
* @param fieldId Resource Fields.
|
|
6964
6964
|
* @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}.
|
|
6965
6965
|
* The `value` property of the result is the GUID of the resource as a string.
|
|
@@ -6990,7 +6990,7 @@ declare namespace Office {
|
|
|
6990
6990
|
*/
|
|
6991
6991
|
getSelectedTaskAsync(options?: Office.AsyncContextOptions, callback?: (result: AsyncResult<string>) => void): void;
|
|
6992
6992
|
/**
|
|
6993
|
-
* Project documents only. Get the current selected Task's
|
|
6993
|
+
* Project documents only. Get the current selected Task's ID.
|
|
6994
6994
|
* @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}.
|
|
6995
6995
|
* The `value` property of the result is the GUID of the resource as a string.
|
|
6996
6996
|
*
|
|
@@ -7022,7 +7022,7 @@ declare namespace Office {
|
|
|
7022
7022
|
* @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}.
|
|
7023
7023
|
* The `value` property of the result contains the following properties:
|
|
7024
7024
|
* `taskName` - The name of the task.
|
|
7025
|
-
* `wssTaskId` - The ID of the task in the synchronized SharePoint task list. If the project
|
|
7025
|
+
* `wssTaskId` - The ID of the task in the synchronized SharePoint task list. If the project isn't synchronized with a SharePoint task list, the value is 0.
|
|
7026
7026
|
* `resourceNames` - The comma-separated list of the names of resources that are assigned to the task.
|
|
7027
7027
|
*
|
|
7028
7028
|
*/
|
|
@@ -7058,7 +7058,7 @@ declare namespace Office {
|
|
|
7058
7058
|
*/
|
|
7059
7059
|
getTaskFieldAsync(taskId: string, fieldId: number, callback?: (result: AsyncResult<any>) => void): void;
|
|
7060
7060
|
/**
|
|
7061
|
-
* Project documents only. Get the WSS
|
|
7061
|
+
* Project documents only. Get the WSS URL and list name for the Tasks List, the MPP is synced too.
|
|
7062
7062
|
* @param options Provides an option for preserving context data of any type, unchanged, for use in a callback.
|
|
7063
7063
|
* @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}.
|
|
7064
7064
|
* The `value` property of the result contains the following properties:
|
|
@@ -7182,7 +7182,7 @@ declare namespace Office {
|
|
|
7182
7182
|
*
|
|
7183
7183
|
* **Important**: This API works only in Project on Windows desktop.
|
|
7184
7184
|
*
|
|
7185
|
-
* @param resourceId Either a string or value of the
|
|
7185
|
+
* @param resourceId Either a string or value of the resource ID.
|
|
7186
7186
|
* @param fieldId Resource Fields.
|
|
7187
7187
|
* @param fieldValue Value of the target field.
|
|
7188
7188
|
* @param callback Optional. A function that is invoked when the callback returns, whose only parameter is of type {@link Office.AsyncResult}.
|
|
@@ -7910,15 +7910,15 @@ declare namespace Office {
|
|
|
7910
7910
|
*
|
|
7911
7911
|
* **Applications**: Excel, PowerPoint, Word
|
|
7912
7912
|
*
|
|
7913
|
-
* The settings created by using the methods of the Settings object are saved per add-in and per document.
|
|
7913
|
+
* The settings created by using the methods of the `Settings` object are saved per add-in and per document.
|
|
7914
7914
|
* That is, they are available only to the add-in that created them, and only from the document in which they are saved.
|
|
7915
7915
|
*
|
|
7916
7916
|
* The name of a setting is a string, while the value can be a string, number, boolean, null, object, or array.
|
|
7917
7917
|
*
|
|
7918
|
-
* The Settings object is automatically loaded as part of the Document object, and is available by calling the settings property of that object
|
|
7918
|
+
* The `Settings` object is automatically loaded as part of the `Document` object, and is available by calling the settings property of that object
|
|
7919
7919
|
* when the add-in is activated.
|
|
7920
7920
|
*
|
|
7921
|
-
* The developer is responsible for calling the saveAsync method after adding or deleting settings to save the settings in the document.
|
|
7921
|
+
* The developer is responsible for calling the `saveAsync` method after adding or deleting settings to save the settings in the document.
|
|
7922
7922
|
*/
|
|
7923
7923
|
interface Settings {
|
|
7924
7924
|
/**
|
office-js-preview/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/office-js-preview",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.691",
|
|
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",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"scripts": {},
|
|
47
47
|
"dependencies": {},
|
|
48
48
|
"peerDependencies": {},
|
|
49
|
-
"typesPublisherContentHash": "
|
|
49
|
+
"typesPublisherContentHash": "84f7ee5194f36db828946b0cce0abfbe75b3f497c970d3aeaed43564494687a1",
|
|
50
50
|
"typeScriptVersion": "5.2",
|
|
51
51
|
"nonNpm": true
|
|
52
52
|
}
|