浏览代码

work in progress

Afshin Darian 8 年之前
父节点
当前提交
e1f74b5e4a
共有 1 个文件被更改,包括 25 次插入1 次删除
  1. 25 1
      packages/apputils-extension/src/settingclientdatastore.ts

+ 25 - 1
packages/apputils-extension/src/settingclientdatastore.ts

@@ -32,7 +32,11 @@ class SettingClientDatastore extends StateDB {
    * Retrieve a saved bundle from the datastore.
    */
   fetch(id: string): Promise<JSONObject | null> {
-    return super.fetch(id);
+    return super.fetch(id).then(result => {
+      const schema = Private.schemas[id] || null;
+      console.log('schema', schema);
+      return result;
+    });
   }
 
   /**
@@ -49,3 +53,23 @@ class SettingClientDatastore extends StateDB {
     return super.save(id, value);
   }
 }
+
+
+/**
+ * A namespace for private module data.
+ */
+namespace Private {
+  type Schema = JSONObject;
+
+  export
+  const schemas: Schema = {
+    'jupyter.services.codemirror-commands': {
+      'jupyter.lab': {
+        'jupyter.services.codemirror-commands': {
+          'iconClass': '',
+          'iconLabel': ''
+        }
+      }
+    }
+  };
+}