Interface IAttachmentsModel

The model for attachments.

interface IAttachmentsModel {
    changed: ISignal<IAttachmentsModel, IAttachmentsModel.ChangedArgs>;
    contentFactory: IAttachmentsModel.IContentFactory;
    isDisposed: boolean;
    keys: readonly string[];
    length: number;
    remove: (key: string) => void;
    stateChanged: ISignal<IAttachmentsModel, void>;
    clear(): void;
    dispose(): void;
    fromJSON(values: IAttachments): void;
    get(key: string): undefined | IAttachmentModel;
    has(key: string): boolean;
    set(key: string, attachment: IMimeBundle): void;
    toJSON(): IAttachments;
}

Hierarchy

Implemented by

Properties

A signal emitted when the model changes.

The attachment content factory used by the model.

isDisposed: boolean

Test whether the object has been disposed.

This property is always safe to access.

keys: readonly string[]

The keys of the attachments in the model.

length: number

The length of the items in the model.

remove: (key: string) => void

Remove the attachment whose name is the specified key. Note that this is optional only until Jupyterlab 2.0 release.

stateChanged: ISignal<IAttachmentsModel, void>

A signal emitted when the model state changes.

Methods

  • Dispose of the resources held by the object.

    If the object's dispose method is called more than once, all calls made after the first will be a no-op.

    It is undefined behavior to use any functionality of the object after it has been disposed unless otherwise explicitly noted.

    Returns void