Quellcode durchsuchen

work in progress

Afshin Darian vor 8 Jahren
Ursprung
Commit
e1f74b5e4a
1 geänderte Dateien mit 25 neuen und 1 gelöschten Zeilen
  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': ''
+        }
+      }
+    }
+  };
+}