1 | import * as nbformat from '@jupyterlab/nbformat';
|
2 | import { IRenderMime } from '@jupyterlab/rendermime-interfaces';
|
3 | import { PartialJSONObject, ReadonlyPartialJSONObject } from '@lumino/coreutils';
|
4 | import { ISignal } from '@lumino/signaling';
|
5 |
|
6 |
|
7 |
|
8 | export interface IOutputModel extends IRenderMime.IMimeModel {
|
9 | |
10 |
|
11 |
|
12 | readonly changed: ISignal<this, void>;
|
13 | |
14 |
|
15 |
|
16 | readonly type: string;
|
17 | |
18 |
|
19 |
|
20 | readonly executionCount: nbformat.ExecutionCount;
|
21 | |
22 |
|
23 |
|
24 | trusted: boolean;
|
25 | |
26 |
|
27 |
|
28 | dispose(): void;
|
29 | |
30 |
|
31 |
|
32 | toJSON(): nbformat.IOutput;
|
33 | }
|
34 |
|
35 |
|
36 |
|
37 | export declare namespace IOutputModel {
|
38 | |
39 |
|
40 |
|
41 | interface IOptions {
|
42 | |
43 |
|
44 |
|
45 | value: nbformat.IOutput;
|
46 | |
47 |
|
48 |
|
49 | trusted?: boolean;
|
50 | }
|
51 | }
|
52 |
|
53 |
|
54 |
|
55 | export declare class OutputModel implements IOutputModel {
|
56 | |
57 |
|
58 |
|
59 | constructor(options: IOutputModel.IOptions);
|
60 | /**
|
61 | * A signal emitted when the output model changes.
|
62 | */
|
63 | get changed(): ISignal<this, void>;
|
64 | /**
|
65 | * The output type.
|
66 | */
|
67 | readonly type: string;
|
68 | /**
|
69 | * The execution count.
|
70 | */
|
71 | readonly executionCount: nbformat.ExecutionCount;
|
72 | /**
|
73 | * Whether the model is trusted.
|
74 | */
|
75 | readonly trusted: boolean;
|
76 | /**
|
77 | * Dispose of the resources used by the output model.
|
78 | */
|
79 | dispose(): void;
|
80 | /**
|
81 | * The data associated with the model.
|
82 | */
|
83 | get data(): ReadonlyPartialJSONObject;
|
84 | /**
|
85 | * The metadata associated with the model.
|
86 | */
|
87 | get metadata(): ReadonlyPartialJSONObject;
|
88 | /**
|
89 | * Set the data associated with the model.
|
90 | *
|
91 | * #### Notes
|
92 | * Depending on the implementation of the mime model,
|
93 | * this call may or may not have deferred effects,
|
94 | */
|
95 | setData(options: IRenderMime.IMimeModel.ISetDataOptions): void;
|
96 | /**
|
97 | * Serialize the model to JSON.
|
98 | */
|
99 | toJSON(): nbformat.IOutput;
|
100 | /**
|
101 | * Update an observable JSON object using a readonly JSON object.
|
102 | */
|
103 | private _updateObservable;
|
104 | private _changed;
|
105 | private _raw;
|
106 | private _rawMetadata;
|
107 | private _rawData;
|
108 | private _data;
|
109 | private _metadata;
|
110 | }
|
111 | /**
|
112 | * The namespace for OutputModel statics.
|
113 | */
|
114 | export declare namespace OutputModel {
|
115 | |
116 |
|
117 |
|
118 |
|
119 |
|
120 |
|
121 |
|
122 | function getData(output: nbformat.IOutput): PartialJSONObject;
|
123 | |
124 |
|
125 |
|
126 |
|
127 |
|
128 |
|
129 |
|
130 | function getMetadata(output: nbformat.IOutput): PartialJSONObject;
|
131 | }
|