Adding run overloads and eventproperties (#27505)

This commit is contained in:
Alex Jerabek
2018-07-23 12:06:33 -07:00
committed by Andy
parent fa7a253072
commit 378f800625

View File

@@ -14426,7 +14426,7 @@ declare namespace Excel {
* @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Excel application. Since the Office add-in and the Excel application run in two different processes, the RequestContext is required to get access to the Excel object model from the add-in.
*/
function run<T>(options: Excel.RunOptions, batch: (context: Excel.RequestContext) => Promise<T>): Promise<T>;
/**
/**
* Executes a batch script that performs actions on the Excel object model, using the RequestContext of a previously-created object. When the promise is resolved, any tracked objects that were automatically allocated during execution will be released.
*
* @remarks
@@ -49752,6 +49752,13 @@ declare namespace Word {
* Executes a batch script that performs actions on the Word object model, using the RequestContext of previously-created API objects.
* @param objects - An array of previously-created API objects. The array will be validated to make sure that all of the objects share the same context. The batch will use this shared RequestContext, which means that any changes applied to these objects will be picked up by "context.sync()".
* @param batch - A function that takes in a RequestContext and returns a promise (typically, just the result of "context.sync()"). The context parameter facilitates requests to the Word application. Since the Office add-in and the Word application run in two different processes, the RequestContext is required to get access to the Word object model from the add-in.
*
* @remarks
* In addition to this signature, the method also has the following signatures:
*
* `run<T>(batch: (context: Word.RequestContext) => Promise<T>): Promise<T>;`
*
* `run<T>(objects: OfficeExtension.ClientObject[], batch: (context: Word.RequestContext) => Promise<T>): Promise<T>;`
*/
function run<T>(objects: OfficeExtension.ClientObject[], batch: (context: Word.RequestContext) => Promise<T>): Promise<T>;
}
@@ -56162,6 +56169,13 @@ declare namespace OneNote {
* Executes a batch script that performs actions on the OneNote object model, using the request context of previously-created API objects.
* @param object - An array of previously-created API objects. The array will be validated to make sure that all of the objects share the same context. The batch will use this shared request context, which means that any changes applied to these objects will be picked up by "context.sync()".
* @param batch - A function that takes in an OneNote.RequestContext and returns a promise (typically, just the result of "context.sync()"). When the promise is resolved, any tracked objects that were automatically allocated during execution will be released.
*
* @remarks
* In addition to this signature, the method also has the following signatures:
*
* `run<T>(batch: (context: OneNote.RequestContext) => Promise<T>): Promise<T>;`
*
* `run<T>(objects: OfficeExtension.ClientObject[], batch: (context: OneNote.RequestContext) => Promise<T>): Promise<T>;`
*/
function run<T>(objects: OfficeExtension.ClientObject[], batch: (context: OneNote.RequestContext) => Promise<T>): Promise<T>;
}
@@ -56498,6 +56512,8 @@ declare namespace Visio {
* Occurs when the data is refreshed in the diagram.
*
* [Api set: 1.1]
*
* @eventproperty
*/
readonly onDataRefreshComplete: OfficeExtension.EventHandlers<Visio.DataRefreshCompleteEventArgs>;
/**
@@ -56505,6 +56521,8 @@ declare namespace Visio {
* Occurs when the Document is loaded, refreshed, or changed.
*
* [Api set: 1.1]
*
* @eventproperty
*/
readonly onDocumentLoadComplete: OfficeExtension.EventHandlers<Visio.DocumentLoadCompleteEventArgs>;
/**
@@ -56512,6 +56530,8 @@ declare namespace Visio {
* Occurs when the page is finished loading.
*
* [Api set: 1.1]
*
* @eventproperty
*/
readonly onPageLoadComplete: OfficeExtension.EventHandlers<Visio.PageLoadCompleteEventArgs>;
/**
@@ -56519,6 +56539,8 @@ declare namespace Visio {
* Occurs when the current selection of shapes changes.
*
* [Api set: 1.1]
*
* @eventproperty
*/
readonly onSelectionChanged: OfficeExtension.EventHandlers<Visio.SelectionChangedEventArgs>;
/**
@@ -56526,6 +56548,8 @@ declare namespace Visio {
* Occurs when the user moves the mouse pointer into the bounding box of a shape.
*
* [Api set: 1.1]
*
* @eventproperty
*/
readonly onShapeMouseEnter: OfficeExtension.EventHandlers<Visio.ShapeMouseEnterEventArgs>;
/**
@@ -56533,6 +56557,8 @@ declare namespace Visio {
* Occurs when the user moves the mouse out of the bounding box of a shape.
*
* [Api set: 1.1]
*
* @eventproperty
*/
readonly onShapeMouseLeave: OfficeExtension.EventHandlers<Visio.ShapeMouseLeaveEventArgs>;
toJSON(): Visio.Interfaces.DocumentData;
@@ -58706,6 +58732,15 @@ declare namespace Visio {
* Executes a batch script that performs actions on the Visio object model, using the request context of previously-created API objects.
* @param objects - An array of previously-created API objects. The array will be validated to make sure that all of the objects share the same context. The batch will use this shared request context, which means that any changes applied to these objects will be picked up by "context.sync()".
* @param batch - A function that takes in a Visio.RequestContext and returns a promise (typically, just the result of "context.sync()"). When the promise is resolved, any tracked objects that were automatically allocated during execution will be released.
*
* @remarks
* In addition to this signature, the method also has the following signatures:
*
* `run<T>(batch: (context: Visio.RequestContext) => Promise<T>): Promise<T>;`
*
* `run<T>(object: OfficeExtension.ClientObject | OfficeExtension.EmbeddedSession, batch: (context: Visio.RequestContext) => Promise<T>): Promise<T>;`
*
* `run<T>(objects: OfficeExtension.ClientObject[], batch: (context: Visio.RequestContext) => Promise<T>): Promise<T>;`
*/
function run<T>(objects: OfficeExtension.ClientObject[], batch: (context: Visio.RequestContext) => Promise<T>): Promise<T>;
}