mirror of
https://github.com/chenasraf/DefinitelyTyped.git
synced 2026-05-18 01:49:01 +00:00
office-js, office-js-preview, Minimal documentation for seldom used APIs (#65722)
* office-js, office-js-preview, Mininal documentation for seldom used APIs * remove ll-cc
This commit is contained in:
26
types/office-js-preview/index.d.ts
vendored
26
types/office-js-preview/index.d.ts
vendored
@@ -19745,8 +19745,15 @@ declare namespace OfficeExtension {
|
||||
readonly debugInfo: RequestContextDebugInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Specifies options for a session of a Visio diagram embedded in a SharePoint page. Called by constructor of `EmbeddedSession`.
|
||||
* For more information, see {@link https://learn.microsoft.com/office/dev/add-ins/reference/overview/visio-javascript-reference-overview | Visio JavaScript API overview}.
|
||||
*/
|
||||
interface EmbeddedOptions {
|
||||
sessionKey?: string,
|
||||
/*
|
||||
* The iframe element that hosts the Visio diagram.
|
||||
*/
|
||||
container?: HTMLElement,
|
||||
id?: string;
|
||||
timeoutInMilliseconds?: number;
|
||||
@@ -19754,8 +19761,15 @@ declare namespace OfficeExtension {
|
||||
width?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a session of a Visio diagram embedded in a SharePoint page.
|
||||
* For more information, see {@link https://learn.microsoft.com/office/dev/add-ins/reference/overview/visio-javascript-reference-overview | Visio JavaScript API overview}.
|
||||
*/
|
||||
class EmbeddedSession {
|
||||
constructor(url: string, options?: EmbeddedOptions);
|
||||
/**
|
||||
* Initializes the session.
|
||||
*/
|
||||
public init(): Promise<any>;
|
||||
}
|
||||
|
||||
@@ -19921,13 +19935,25 @@ declare namespace OfficeExtension {
|
||||
remove(handler: (args: T) => Promise<any>): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables the removal of an event handler. Returned by the `EventHandlers.add` method.
|
||||
*
|
||||
* **Note**: The same {@link OfficeExtension.ClientRequestContext | RequestContext} object that the handler was added in must be used when removing the handler.
|
||||
* More information can be found in {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-events#remove-an-event-handler | Remove an event handler}.
|
||||
*/
|
||||
class EventHandlerResult<T> {
|
||||
constructor(context: ClientRequestContext, handlers: EventHandlers<T>, handler: (args: T) => Promise<any>);
|
||||
/** The request context associated with the object */
|
||||
context: ClientRequestContext;
|
||||
/**
|
||||
* Removes the handler from the event.
|
||||
*/
|
||||
remove(): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by Office to construct event handlers. Do not call in your code.
|
||||
*/
|
||||
interface EventInfo<T> {
|
||||
registerFunc: (callback: (args: any) => void) => Promise<any>;
|
||||
unregisterFunc: (callback: (args: any) => void) => Promise<any>;
|
||||
|
||||
26
types/office-js/index.d.ts
vendored
26
types/office-js/index.d.ts
vendored
@@ -19342,8 +19342,15 @@ declare namespace OfficeExtension {
|
||||
readonly debugInfo: RequestContextDebugInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Specifies options for a session of a Visio diagram embedded in a SharePoint page. Called by constructor of `EmbeddedSession`.
|
||||
* For more information, see {@link https://learn.microsoft.com/office/dev/add-ins/reference/overview/visio-javascript-reference-overview | Visio JavaScript API overview}.
|
||||
*/
|
||||
interface EmbeddedOptions {
|
||||
sessionKey?: string,
|
||||
/*
|
||||
* The iframe element that hosts the Visio diagram.
|
||||
*/
|
||||
container?: HTMLElement,
|
||||
id?: string;
|
||||
timeoutInMilliseconds?: number;
|
||||
@@ -19351,8 +19358,15 @@ declare namespace OfficeExtension {
|
||||
width?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Represents a session of a Visio diagram embedded in a SharePoint page.
|
||||
* For more information, see {@link https://learn.microsoft.com/office/dev/add-ins/reference/overview/visio-javascript-reference-overview | Visio JavaScript API overview}.
|
||||
*/
|
||||
class EmbeddedSession {
|
||||
constructor(url: string, options?: EmbeddedOptions);
|
||||
/**
|
||||
* Initializes the session.
|
||||
*/
|
||||
public init(): Promise<any>;
|
||||
}
|
||||
|
||||
@@ -19518,13 +19532,25 @@ declare namespace OfficeExtension {
|
||||
remove(handler: (args: T) => Promise<any>): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* Enables the removal of an event handler. Returned by the `EventHandlers.add` method.
|
||||
*
|
||||
* **Note**: The same {@link OfficeExtension.ClientRequestContext | RequestContext} object that the handler was added in must be used when removing the handler.
|
||||
* More information can be found in {@link https://learn.microsoft.com/office/dev/add-ins/excel/excel-add-ins-events#remove-an-event-handler | Remove an event handler}.
|
||||
*/
|
||||
class EventHandlerResult<T> {
|
||||
constructor(context: ClientRequestContext, handlers: EventHandlers<T>, handler: (args: T) => Promise<any>);
|
||||
/** The request context associated with the object */
|
||||
context: ClientRequestContext;
|
||||
/*
|
||||
* Removes the handler from the event.
|
||||
*/
|
||||
remove(): void;
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by Office to construct event handlers. Do not call in your code.
|
||||
*/
|
||||
interface EventInfo<T> {
|
||||
registerFunc: (callback: (args: any) => void) => Promise<any>;
|
||||
unregisterFunc: (callback: (args: any) => void) => Promise<any>;
|
||||
|
||||
Reference in New Issue
Block a user