Sfoglia il codice sorgente

Add IExecuteReply to nbformat.

Afshin Darian 8 anni fa
parent
commit
c0a732ca84
1 ha cambiato i file con 24 aggiunte e 2 eliminazioni
  1. 24 2
      src/notebook/notebook/nbformat.ts

+ 24 - 2
src/notebook/notebook/nbformat.ts

@@ -254,7 +254,7 @@ namespace nbformat {
    * The valid output types.
    */
   export
-  type OutputType = 'execute_result' | 'display_data' | 'stream' | 'error';
+  type OutputType = 'execute_reply' | 'execute_result' | 'display_data' | 'stream' | 'error';
 
 
   /**
@@ -269,6 +269,28 @@ namespace nbformat {
   }
 
 
+  /**
+   * Result of a non-execution reply to a code cell execution.
+   */
+  export
+  interface IExecuteReply extends IBaseOutput {
+    /**
+     * Type of cell output.
+     */
+    output_type: 'execute_reply';
+
+    /**
+     * A result's prompt number.
+     */
+    execution_count: number;
+
+    /**
+     * A mime-type keyed dictionary of data.
+     */
+    data: MimeBundle;
+  }
+
+
   /**
    * Result of executing a code cell.
    */
@@ -371,5 +393,5 @@ namespace nbformat {
    * An output union type.
    */
   export
-  type IOutput = IExecuteResult | IDisplayData | IStream | IError;
+  type IOutput = IExecuteReply | IExecuteResult | IDisplayData | IStream | IError;
 }