SheetXL - v0.3.20
    Preparing search index...

    Interface INamed<T>

    Defined names are descriptive texts that are used to represents a cell, range of cells, formula, or constant value.

    interface INamed<T = any> {
        isIModel: true;
        isINamed: true;
        addListeners(listeners: IListeners, options?: IListener.Options): Remove;
        beginCommit(options?: string | OperationOptions): ITransaction;
        close(): void;
        delete(options?: OperationOptions): void;
        doBatch<R = any>(
            callback: (commit: ICommit) => R | Promise<R>,
            options?: string | OperationOptions,
        ): R | Promise<R>;
        getComment(): string;
        getName(): string;
        getRanges(): ICellRanges;
        getScope(): string;
        getType(): string;
        getUUID(): string;
        getValue(): T;
        isClosed(): boolean;
        isDeleted(): boolean;
        isHidden(): boolean;
        isReadOnly(): boolean;
        select(options?: ITypes.SelectOptions): Promise<INamed<T>>;
        setComment(comment: string, options?: OperationOptions): this;
        setHidden(hidden: boolean, options?: OperationOptions): this;
        setName(name: string, options?: OperationOptions): this;
        setScope(scope: string, options?: OperationOptions): this;
        toJSON(): JSON;
    }

    Type Parameters

    • T = any

    Hierarchy (View Summary)

    Index

    Properties

    isIModel: true

    For runtime type checking.

    isINamed: true

    For runtime type checking.

    Methods

    • Add Listeners.

      Parameters

      Returns Remove

      IListener.ISource.addListeners

    • Batches all 'transactional' changes until they have all be committed or rolled back.

      Parameters

      • Optionaloptions: string | OperationOptions

        Description of the operation or additional options. Used for tracking undo/redo and history. Default Value User Operation.

      Returns ITransaction

      Any changes that are made to this object will be reflected in the local record but not committed to the transactional store until the batch is popped.

      Useful for operations that are longer running but generally not recommended as it keeps a transaction open. doBatch is the preferred option.

    • Close the record and cleans resources. Can't be undone.

      Returns void

    • Delete the item.

      Parameters

      Returns void

      Not all objects can be deleted.

    • Provides a mechanism to perform a set of operations in a batch.

      Type Parameters

      • R = any

      Parameters

      • callback: (commit: ICommit) => R | Promise<R>

        A callback that performs multiple operations all within the same transaction.

      • Optionaloptions: string | OperationOptions

        Description of the operation or additional options. Used for tracking undo/redo and history. Default Value User Operation.

      Returns R | Promise<R>

    • Returns string

    • Return the ranges that are associated with the named item or null if no ranges are available.

      Returns ICellRanges

      • Optional
    • A string identifying the scope. This is normally a sheet name.

      Returns string

      If null then this will be treated as a global scope.

    • A string to identify the type of named item.

      Returns string

      Immutable

    • A unique identifier for the record. This will never change.

      Returns string

      This enables the record to be identified across transactions and users in a collaborative environment.

    • The underlying item that is being referenced.

      Returns T

      Immutable

    • Returns true if no more operations are allowed.

      Returns boolean

    • If the model unable to be modified.

      Returns boolean

    • If the model unable to be modified.

      Returns boolean

    • The comment for the defined name.

      Parameters

      Returns this

      If null then no comment

    • If true then the name is not visible.

      Parameters

      Returns this

      false
      
      • Optional
      • This does not affect the item itself
    • This is the name that identifies the item.

      Parameters

      Returns this

    • A string identifying the scope. This is normally a sheet name If null then this will be treated as a global scope.

      Parameters

      Returns this

      null - Indicating global

      • Optional
    • Return a JSON if this can be serialize.

      Returns JSON