UNPKG

jupyterlab-emrys

Version:

A computational environment for Jupyter. Powered by Emrys

58 lines (57 loc) 1.27 kB
/** * A class used to interact with user level metadata. */ export interface IMetadataCursor { /** * The metadata namespace. */ name: string; /** * Get the value of the metadata. */ getValue(): any; /** * Set the value of the metdata. */ setValue(value: any): void; } /** * An implementation of a metadata cursor. */ export declare class MetadataCursor implements IMetadataCursor { /** * Construct a new metadata cursor. * * @param name - The metadata namespace key. * * @param read - The read callback. * * @param write - The write callback. */ constructor(name: string, read: () => any, write: (value: any) => void); /** * Get the namespace key of the metadata. * * #### Notes * This is a read-only property. */ name: string; /** * Dispose of the resources used by the cursor. * * #### Notes * This is not meant to be called by user code. */ dispose(): void; /** * Get the value of the namespace data. */ getValue(): any; /** * Set the value of the namespace data. */ setValue(value: any): void; private _name; private _read; private _write; }