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) => void);
    stateChanged: ISignal<IAttachmentsModel, void>;
    clear(): void;
    dispose(): void;
    fromJSON(values): void;
    get(key): undefined | IAttachmentModel;
    has(key): boolean;
    set(key, attachment): 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.

Notes

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) => void)

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

Type declaration

    • (key): void
    • Parameters

      • key: string

      Returns void

stateChanged: ISignal<IAttachmentsModel, void>

A signal emitted when the model state changes.

Methods

  • Dispose of the resources held by the object.

    Notes

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

    Undefined Behavior

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

    Returns void