浏览代码

Update common

Steven Silvester 8 年之前
父节点
当前提交
022e4c2e80
共有 4 个文件被更改,包括 8 次插入6 次删除
  1. 1 2
      src/commandpalette/plugin.ts
  2. 1 1
      src/common/activitymonitor.ts
  3. 2 1
      src/common/instancetracker.ts
  4. 4 2
      src/common/vdom.ts

+ 1 - 2
src/commandpalette/plugin.ts

@@ -3,7 +3,6 @@
 | Distributed under the terms of the Modified BSD License.
 |----------------------------------------------------------------------------*/
 
-
 import {
   DisposableDelegate, IDisposable
 } from 'phosphor/lib/core/disposable';
@@ -129,7 +128,7 @@ function activateCommandPalette(app: JupyterLab): ICommandPalette {
     label: 'Toggle Command Palette'
   });
 
-  palette.inputNode.placeholder = "SEARCH";
+  palette.inputNode.placeholder = 'SEARCH';
 
   app.shell.addToLeftArea(palette);
 

+ 1 - 1
src/common/activitymonitor.ts

@@ -26,7 +26,7 @@ class ActivityMonitor<Sender, Args> implements IDisposable {
   /**
    * A signal emitted when activity has ceased.
    */
-  activityStopped: ISignal<ActivityMonitor<Sender, Args>, ActivityMonitor.IArguments<Sender, Args>>;
+  readonly activityStopped: ISignal<this, ActivityMonitor.IArguments<Sender, Args>>;
 
   /**
    * The timeout associated with the monitor, in milliseconds.

+ 2 - 1
src/common/instancetracker.ts

@@ -91,6 +91,7 @@ interface IInstanceTracker<T extends Widget> {
   inject(widget: T): void;
 }
 
+
 /**
  * A class that keeps track of widget instances.
  *
@@ -128,7 +129,7 @@ class InstanceTracker<T extends Widget> implements IInstanceTracker<T>, IDisposa
     }
 
     Promise.all(promises).then(([saved]) => {
-      let promises = saved.map(args => {
+      promises = saved.map(args => {
         // Execute the command and if it fails, delete the state restore data.
         return registry.execute(command, args.value)
           .catch(() => { state.remove(args.id); });

+ 4 - 2
src/common/vdom.ts

@@ -30,7 +30,7 @@ interface IVDomModel extends IDisposable {
   /**
    * A signal emited when any model state changes.
    */
-  stateChanged: ISignal<IVDomModel, void>;
+  readonly stateChanged: ISignal<IVDomModel, void>;
 }
 
 
@@ -42,7 +42,7 @@ class VDomModel implements IVDomModel {
   /**
    * A signal emitted when any model state changes.
    */
-  stateChanged: ISignal<this, void>;
+  readonly stateChanged: ISignal<this, void>;
 
   /**
    * Dispose the model.
@@ -65,6 +65,7 @@ class VDomModel implements IVDomModel {
   private _isDisposed = false;
 }
 
+
 // Define the signals for the VDomModel class.
 defineSignal(VDomModel.prototype, 'stateChanged');
 
@@ -148,5 +149,6 @@ abstract class VDomWidget<T extends IVDomModel> extends Widget {
   private _model: T;
 }
 
+
 // Define the signal for the VDomWidget class.
 defineSignal(VDomWidget.prototype, 'modelChanged');