diff --git a/types/office-js/index.d.ts b/types/office-js/index.d.ts index b8b06bd1f2..8c19b56626 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; } /**