Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IAttachmentsModel

The model for attachments.

Hierarchy

  • IDisposable
    • IAttachmentsModel

Implemented by

Index

Properties

Readonly changed

changed: ISignal<IAttachmentsModel, ChangedArgs>

A signal emitted when the model changes.

Readonly contentFactory

contentFactory: IContentFactory

The attachment content factory used by the model.

Readonly isDisposed

isDisposed: boolean

Test whether the object has been disposed.

Notes

This property is always safe to access.

Readonly keys

keys: readonly string[]

The keys of the attachments in the model.

Readonly length

length: number

The length of the items in the model.

remove

remove: (key: string) => void

Type declaration

    • (key: string): void
    • Remove the attachment whose name is the specified key. Note that this is optional only until Jupyterlab 2.0 release.

      Parameters

      • key: string

      Returns void

Readonly stateChanged

stateChanged: ISignal<IAttachmentsModel, void>

A signal emitted when the model state changes.

Methods

clear

  • clear(): void
  • Clear all of the attachments.

    Returns void

dispose

  • dispose(): void
  • 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

fromJSON

  • Deserialize the model from JSON.

    Notes

    This will clear any existing data.

    Parameters

    Returns void

get

  • Get an item for the specified key.

    Parameters

    • key: string

    Returns IAttachmentModel

has

  • has(key: string): boolean
  • Whether the specified key is set.

    Parameters

    • key: string

    Returns boolean

set

  • Set the value of the specified key.

    Parameters

    Returns void

toJSON

  • Serialize the model to JSON.

    Returns IAttachments

Generated using TypeDoc