1 | import { IRenderMime } from '@jupyterlab/rendermime-interfaces';
|
2 | import { ReadonlyPartialJSONObject } from '@lumino/coreutils';
|
3 |
|
4 |
|
5 |
|
6 | export declare class MimeModel implements IRenderMime.IMimeModel {
|
7 | |
8 |
|
9 |
|
10 | constructor(options?: MimeModel.IOptions);
|
11 | /**
|
12 | * Whether the model is trusted.
|
13 | */
|
14 | readonly trusted: boolean;
|
15 | /**
|
16 | * The data associated with the model.
|
17 | */
|
18 | get data(): ReadonlyPartialJSONObject;
|
19 | /**
|
20 | * The metadata associated with the model.
|
21 | */
|
22 | get metadata(): ReadonlyPartialJSONObject;
|
23 | /**
|
24 | * Set the data associated with the model.
|
25 | *
|
26 | * #### Notes
|
27 | * Depending on the implementation of the mime model,
|
28 | * this call may or may not have deferred effects,
|
29 | */
|
30 | setData(options: IRenderMime.IMimeModel.ISetDataOptions): void;
|
31 | private _callback;
|
32 | private _data;
|
33 | private _metadata;
|
34 | }
|
35 | /**
|
36 | * The namespace for MimeModel class statics.
|
37 | */
|
38 | export declare namespace MimeModel {
|
39 | |
40 |
|
41 |
|
42 | interface IOptions {
|
43 | |
44 |
|
45 |
|
46 | trusted?: boolean;
|
47 | |
48 |
|
49 |
|
50 | callback?: (options: IRenderMime.IMimeModel.ISetDataOptions) => void;
|
51 | |
52 |
|
53 |
|
54 | data?: ReadonlyPartialJSONObject;
|
55 | |
56 |
|
57 |
|
58 | metadata?: ReadonlyPartialJSONObject;
|
59 | }
|
60 | }
|