From 03634965e7f146d7ddcab37c9190d56ed7418d18 Mon Sep 17 00:00:00 2001 From: mscharlock Date: Tue, 18 Sep 2018 10:12:17 -0700 Subject: [PATCH 1/3] changes --- types/office-runtime/index.d.ts | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/types/office-runtime/index.d.ts b/types/office-runtime/index.d.ts index 0847829553..216e2f2adc 100644 --- a/types/office-runtime/index.d.ts +++ b/types/office-runtime/index.d.ts @@ -12,18 +12,18 @@ Copyright (c) Microsoft Corporation declare namespace OfficeRuntime { function displayWebDialog(url: string, options: DisplayWebDialogOptions): Promise; const AsyncStorage: AsyncStorage; - + // tslint:disable-next-line:interface-name /* * Asynchronous, global, and persistent key-value storage that can be used by Excel Custom Functions. * @beta * - * @remarks - * Each add-in instance has its own storage partition, unique to a user and their device. + * @remarks + * Each add-in instance has its own storage partition, unique to a user and their device. * - * The default amount of total storage allowed per add-in is 5MB. + * The default amount of total storage allowed per add-in is 5MB. * - * Each method listed below returns a Promise object. + * Each method listed below returns a Promise object. * */ interface AsyncStorage { @@ -34,27 +34,27 @@ declare namespace OfficeRuntime { getItem(key: string, callback?: (error?: Error, result?: string) => void): Promise; /* * @beta - * Assigns the value for a key-value pair and invokes a callback when finished. Returns a Promise. + * Assigns the value for a key-value pair and invokes a callback when finished. Returns a Promise. */ setItem(key: string, value: string, callback?: (error?: Error) => void): Promise; /* * @beta - * Removes an item for specified key and invokes a callback when finished. Returns a Promise. + * Removes an item for specified key and invokes a callback when finished. Returns a Promise. */ removeItem(key: string, callback?: (error?: Error) => void): Promise; /* * @beta - * Erases all AsyncStorage. Returns a Promise. + * Erases all AsyncStorage. Returns a Promise. */ clear(callback?: (error?: Error) => void): Promise; /* * @beta - * Returns a Promise with all keys. + * Returns a Promise with all keys. */ getAllKeys(callback?: (error?: Error, keys?: string[]) => void): Promise; /* * @beta - * Stores multiple key-value pairs in one batch. Returns a Promise. When a key doesn't exist, returns null. + * Stores multiple key-value pairs in one batch. Returns a Promise. When a key doesn't exist, returns null. */ multiSet(keyValuePairs: string[][], callback?: (errors?: Error[]) => void): Promise; /* @@ -64,11 +64,10 @@ declare namespace OfficeRuntime { multiRemove(keys: string[], callback?: (errors?: Error[]) => void): Promise; /* * @beta - * Fetches a batch of keys, specified in the `keys` array. When a key doesn't exist, returns null. + * Fetches a batch of keys, specified in the `keys` array. When a key doesn't exist, returns null. */ multiGet(keys: string[], callback?: (errors?: Error[], result?: string[][]) => void): Promise; } - /* * @beta * Object representing the dialog box. From f6166df47366ef512f47bbdf2c6deb30fa5420c8 Mon Sep 17 00:00:00 2001 From: mscharlock Date: Tue, 18 Sep 2018 10:14:46 -0700 Subject: [PATCH 2/3] spaces --- types/office-runtime/index.d.ts | 32 ++++++++++++++------------------ 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/types/office-runtime/index.d.ts b/types/office-runtime/index.d.ts index 216e2f2adc..74cb1179a3 100644 --- a/types/office-runtime/index.d.ts +++ b/types/office-runtime/index.d.ts @@ -20,11 +20,11 @@ declare namespace OfficeRuntime { * * @remarks * Each add-in instance has its own storage partition, unique to a user and their device. - * + * * The default amount of total storage allowed per add-in is 5MB. - * + * * Each method listed below returns a Promise object. - * + * */ interface AsyncStorage { /* @@ -34,7 +34,7 @@ declare namespace OfficeRuntime { getItem(key: string, callback?: (error?: Error, result?: string) => void): Promise; /* * @beta - * Assigns the value for a key-value pair and invokes a callback when finished. Returns a Promise. + * Assigns the value for a key-value pair and invokes a callback when finished. Returns a Promise. */ setItem(key: string, value: string, callback?: (error?: Error) => void): Promise; /* @@ -70,23 +70,23 @@ declare namespace OfficeRuntime { } /* * @beta - * Object representing the dialog box. + * Object representing the dialog box. */ interface Dialog { /* * @beta - * Method that closes a dialog box. + * Method that closes a dialog box. */ close(): Promise; } /* - * Provides options for how a dialog is displayed. + * Provides options for how a dialog is displayed. */ interface DisplayWebDialogOptions { /* * @beta - * Determines whether the dialog box displays as a popup (false) or within an IFrame (true). This setting is only applicable to custom functions running on Excel Online. + * Determines whether the dialog box displays as a popup (false) or within an IFrame (true). This setting is only applicable to custom functions running on Excel Online. */ displayInIFrame?: boolean; /* @@ -94,25 +94,21 @@ declare namespace OfficeRuntime { * Defines the height of the dialog box as a percentage of the current display. */ height?: string; - - /** - * @beta - * Defines the width of the dialog box as a percentage of the current display. - */ - width?: string; - /* * @beta - * True if title is hidden from the dialog box. + * Defines the width of the dialog box as a percentage of the current display. + */ + width?: string; + /* + * @beta + * True if title is hidden from the dialog box. */ hideTitle?: boolean; - /* * @beta * Callback that is run when the dialog box is closed. */ onClose?: () => void; - /* * @beta * Callback that is run when the dialog box sends an error. From 2c2c7e2acd34d93b1f5d21d80ce3ed1f1fa9ab7f Mon Sep 17 00:00:00 2001 From: mscharlock Date: Tue, 18 Sep 2018 10:17:01 -0700 Subject: [PATCH 3/3] lint fix --- types/office-runtime/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/office-runtime/index.d.ts b/types/office-runtime/index.d.ts index 74cb1179a3..bb0d779b11 100644 --- a/types/office-runtime/index.d.ts +++ b/types/office-runtime/index.d.ts @@ -79,7 +79,7 @@ declare namespace OfficeRuntime { */ close(): Promise; } - + /* * Provides options for how a dialog is displayed. */ @@ -113,6 +113,6 @@ declare namespace OfficeRuntime { * @beta * Callback that is run when the dialog box sends an error. */ - onMessage?(message: string, dialog?: Dialog): void + onMessage?(message: string, dialog?: Dialog): void; } }