SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Interface IConditionalFormatCollection

    Holds a collection of IConditionalFormats.

    interface IConditionalFormatCollection {
        isICollection: true;
        isIConditionalFormatCollection: true;
        "[iterator]"(): IterableIterator<IConditionalFormat>;
        add(
            address: ICellRanges.Address | IConditionalFormat,
            options?: IConditionalFormatCollection.AddOptions,
        ): IConditionalFormat;
        addListeners(
            listeners: ICollection.IListeners,
            options?: IListener.Options,
        ): Remove;
        at(index: number): IConditionalFormat | undefined;
        createItem(template?: IConditionalFormat): IConditionalFormat;
        every(
            predicate: (
                value: IConditionalFormat,
                index: number,
                items: readonly IConditionalFormat[],
            ) => boolean,
        ): boolean;
        filter<S extends IConditionalFormat>(
            predicate: (
                value: IConditionalFormat,
                index: number,
                items: readonly IConditionalFormat[],
            ) => value is S,
        ): S[];
        filter(
            predicate: (
                value: IConditionalFormat,
                index: number,
                items: readonly IConditionalFormat[],
            ) => boolean,
        ): IConditionalFormat[];
        find<S extends IConditionalFormat>(
            predicate: (
                value: IConditionalFormat,
                index: number,
                items: readonly IConditionalFormat[],
            ) => value is S,
        ): S | undefined;
        find(
            predicate: (
                value: IConditionalFormat,
                index: number,
                items: readonly IConditionalFormat[],
            ) => boolean,
        ): IConditionalFormat | undefined;
        findIndex(
            predicate: (
                value: IConditionalFormat,
                index: number,
                items: readonly IConditionalFormat[],
            ) => boolean,
        ): number;
        forEach(
            fn: (
                value: IConditionalFormat,
                index: number,
                items: readonly IConditionalFormat[],
            ) => void,
        ): void;
        getCount(): number;
        getItems(
            options?: IConditionalFormatCollection.GetItemsOptions,
        ): IConditionalFormat[];
        indexOf(item: IConditionalFormat): number;
        isClosed(): boolean;
        map<U>(
            fn: (
                value: IConditionalFormat,
                index: number,
                items: readonly IConditionalFormat[],
            ) => U,
        ): U[];
        some(
            predicate: (
                value: IConditionalFormat,
                index: number,
                items: readonly IConditionalFormat[],
            ) => boolean,
        ): boolean;
        toArray(): IConditionalFormat[];
    }

    Hierarchy (View Summary)

    Index
    isICollection: true

    For runtime type checking.

    isIConditionalFormatCollection: true

    For runtime type checking.

    • Iterates the collection's items.

      Returns IterableIterator<IConditionalFormat>

      The unfiltered walk — for (const sheet of wb.getSheets()). Every other iterable surface in the SDK (ICellRange, ICellRegions, ICellRanges) reads this way, so a collection that did not was a trap: for…of over one is the obvious line to write and it threw at runtime with nothing in the types to warn first.

      getItems remains the call that takes options — filtering, ordering, anything parameterized. This is sugar over the unfiltered case, not a replacement for it.

    • Returns the item at the given index, or undefined if there is none.

      Parameters

      • index: number

        The position in iteration order. A negative index counts back from the end, as Array.prototype.at does.

      Returns IConditionalFormat | undefined

    • Returns true if the predicate accepts every item, including when there are none.

      Parameters

      • predicate: (
            value: IConditionalFormat,
            index: number,
            items: readonly IConditionalFormat[],
        ) => boolean

        Called once per item in iteration order until it returns false.

      Returns boolean

    • Returns the index of the first item the predicate accepts, or -1 if it accepts none.

      Parameters

      • predicate: (
            value: IConditionalFormat,
            index: number,
            items: readonly IConditionalFormat[],
        ) => boolean

        Called once per item in iteration order until it returns true.

      Returns number

    • Returns the total items available.

      Returns number

      returns the total number of items available.

    • Returns true once the collection has been closed.

      Returns boolean

      A closed collection is empty and announces nothing further. Collections that are closed by their owner (the workbook's names, functions and modules, when the workbook closes) announce it once with ICollection.Events.onClose; the others are never closed and always return false.

    • Returns true if the predicate accepts at least one item.

      Parameters

      • predicate: (
            value: IConditionalFormat,
            index: number,
            items: readonly IConditionalFormat[],
        ) => boolean

        Called once per item in iteration order until it returns true.

      Returns boolean

    • Returns the items as a fresh array, in iteration order.

      Returns IConditionalFormat[]

      The call to make when an array is really wanted. The array is the caller's: changing it does not change the collection, and it does not follow later changes to the collection.