From 85584d1bca5d22a3d186908e8dacd035d2a970d0 Mon Sep 17 00:00:00 2001 From: Alex Jerabek Date: Fri, 14 Dec 2018 14:03:56 -0800 Subject: [PATCH 1/3] Adding warning label to StyleCollection APIs --- types/office-js/index.d.ts | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index b8b06bd1f2..68045d2074 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -30226,14 +30226,17 @@ declare namespace Excel { }): Excel.Style; toJSON(): Excel.Interfaces.StyleData; } + /** * - * Represents a collection of all the styles. + * Represents a collection of all the styles. WARNING: The StyleCollection items array has a known issue when loading items from the collection. Do not use `StyleCollection.items`, any `load()` method, and the `toJSON()` method.” * * [Api set: ExcelApi 1.7] */ class StyleCollection extends OfficeExtension.ClientObject { - /** Gets the loaded child items in this collection. */ + /** + * WARNING: The StyleCollection items array has a known issue when loading items from the collection. Do not use `StyleCollection.items`, any `load()` method, and the `toJSON()` method.” + */ readonly items: Excel.Style[]; /** * @@ -30254,23 +30257,14 @@ declare namespace Excel { */ getItem(name: string): Excel.Style; /** - * Queues up a command to load the specified properties of the object. You must call "context.sync()" before reading the properties. - * - * @remarks - * - * In addition to this signature, this method has the following signatures: - * - * `load(option?: string | string[]): Excel.StyleCollection` - Where option is a comma-delimited string or an array of strings that specify the properties to load. - * - * `load(option?: { select?: string; expand?: string; }): Excel.StyleCollection` - Where option.select is a comma-delimited string that specifies the properties to load, and options.expand is a comma-delimited string that specifies the navigation properties to load. - * - * `load(option?: { select?: string; expand?: string; top?: number; skip?: number }): Excel.StyleCollection` - Only available on collection types. It is similar to the preceding signature. Option.top specifies the maximum number of collection items that can be included in the result. Option.skip specifies the number of items that are to be skipped and not included in the result. If option.top is specified, the result set will start after skipping the specified number of items. - * - * @param options Provides options for which properties of the object to load. + * WARNING: The StyleCollection items array has a known issue when loading items from the collection. Do not use `StyleCollection.items`, any `load()` method, and the `toJSON()` method.” */ load(option?: Excel.Interfaces.StyleCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.StyleCollection; load(option?: string | string[]): Excel.StyleCollection; load(option?: OfficeExtension.LoadOption): Excel.StyleCollection; + /** + * WARNING: The StyleCollection items array has a known issue when loading items from the collection. Do not use `StyleCollection.items`, any `load()` method, and the `toJSON()` method.” + */ toJSON(): Excel.Interfaces.StyleCollectionData; } /** From 08a4f704007bc57161e33cc008a37d70dd444722 Mon Sep 17 00:00:00 2001 From: Alex Jerabek Date: Fri, 14 Dec 2018 14:27:16 -0800 Subject: [PATCH 2/3] Removing quote --- types/office-js/index.d.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index 68045d2074..8b164ff528 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -30235,7 +30235,7 @@ declare namespace Excel { */ class StyleCollection extends OfficeExtension.ClientObject { /** - * WARNING: The StyleCollection items array has a known issue when loading items from the collection. Do not use `StyleCollection.items`, any `load()` method, and the `toJSON()` method.” + * WARNING: The StyleCollection items array has a known issue when loading items from the collection. Do not use `StyleCollection.items`, any `load()` method, and the `toJSON()` method. */ readonly items: Excel.Style[]; /** @@ -30257,13 +30257,13 @@ declare namespace Excel { */ getItem(name: string): Excel.Style; /** - * WARNING: The StyleCollection items array has a known issue when loading items from the collection. Do not use `StyleCollection.items`, any `load()` method, and the `toJSON()` method.” + * WARNING: The StyleCollection items array has a known issue when loading items from the collection. Do not use `StyleCollection.items`, any `load()` method, and the `toJSON()` method. */ load(option?: Excel.Interfaces.StyleCollectionLoadOptions & Excel.Interfaces.CollectionLoadOptions): Excel.StyleCollection; load(option?: string | string[]): Excel.StyleCollection; load(option?: OfficeExtension.LoadOption): Excel.StyleCollection; /** - * WARNING: The StyleCollection items array has a known issue when loading items from the collection. Do not use `StyleCollection.items`, any `load()` method, and the `toJSON()` method.” + * WARNING: The StyleCollection items array has a known issue when loading items from the collection. Do not use `StyleCollection.items`, any `load()` method, and the `toJSON()` method. */ toJSON(): Excel.Interfaces.StyleCollectionData; } From aaebd7f104943e5b2695b7587f423494bcfa5b98 Mon Sep 17 00:00:00 2001 From: Alex Jerabek Date: Fri, 14 Dec 2018 14:28:50 -0800 Subject: [PATCH 3/3] Removing quote --- types/office-js/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index 8b164ff528..8c19b56626 100644 --- a/types/office-js/index.d.ts +++ b/types/office-js/index.d.ts @@ -30229,7 +30229,7 @@ declare namespace Excel { /** * - * Represents a collection of all the styles. WARNING: The StyleCollection items array has a known issue when loading items from the collection. Do not use `StyleCollection.items`, any `load()` method, and the `toJSON()` method.” + * Represents a collection of all the styles. WARNING: The StyleCollection items array has a known issue when loading items from the collection. Do not use `StyleCollection.items`, any `load()` method, and the `toJSON()` method. * * [Api set: ExcelApi 1.7] */