@jupyterlab/coreutils
Advanced tools
Comparing version 3.0.0-alpha.3 to 3.0.0-alpha.4
@@ -5,2 +5,12 @@ import { IDataConnector } from './interfaces'; | ||
* | ||
* @typeparam T - The basic entity response type a service's connector. | ||
* | ||
* @typeparam U - The basic entity request type, which is conventionally the | ||
* same as the response type but may be different if a service's implementation | ||
* requires input data to be different from output responses. Defaults to `T`. | ||
* | ||
* @typeparam V - The basic token applied to a request, conventionally a string | ||
* ID or filter, but may be set to a different type when an implementation | ||
* requires it. Defaults to `string`. | ||
* | ||
* #### Notes | ||
@@ -11,14 +21,2 @@ * The only abstract method in this class is the `fetch` method, which must be | ||
* class is a convenience superclass for connectors that only need to `fetch`. | ||
* | ||
* The generic type arguments <T, U = T, V = string> semantics are: | ||
* | ||
* T - is the basic entity response type a particular service's connector. | ||
* | ||
* U = T - is the basic entity request type, which is conventionally the same as | ||
* the response type but may be different if a service's implementation requires | ||
* input data to be different from output responses. | ||
* | ||
* V = string - is the basic token applied to a request, conventionally a string | ||
* ID or filter, but may be set to a different type when an implementation | ||
* requires it. | ||
*/ | ||
@@ -25,0 +23,0 @@ export declare abstract class DataConnector<T, U = T, V = string> implements IDataConnector<T, U, V> { |
"use strict"; | ||
// Copyright (c) Jupyter Development Team. | ||
// Distributed under the terms of the Modified BSD License. | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -8,2 +16,12 @@ /** | ||
* | ||
* @typeparam T - The basic entity response type a service's connector. | ||
* | ||
* @typeparam U - The basic entity request type, which is conventionally the | ||
* same as the response type but may be different if a service's implementation | ||
* requires input data to be different from output responses. Defaults to `T`. | ||
* | ||
* @typeparam V - The basic token applied to a request, conventionally a string | ||
* ID or filter, but may be set to a different type when an implementation | ||
* requires it. Defaults to `string`. | ||
* | ||
* #### Notes | ||
@@ -14,14 +32,2 @@ * The only abstract method in this class is the `fetch` method, which must be | ||
* class is a convenience superclass for connectors that only need to `fetch`. | ||
* | ||
* The generic type arguments <T, U = T, V = string> semantics are: | ||
* | ||
* T - is the basic entity response type a particular service's connector. | ||
* | ||
* U = T - is the basic entity request type, which is conventionally the same as | ||
* the response type but may be different if a service's implementation requires | ||
* input data to be different from output responses. | ||
* | ||
* V = string - is the basic token applied to a request, conventionally a string | ||
* ID or filter, but may be set to a different type when an implementation | ||
* requires it. | ||
*/ | ||
@@ -40,3 +46,5 @@ class DataConnector { | ||
list(query) { | ||
return Promise.reject(new Error('list method has not been implemented.')); | ||
return __awaiter(this, void 0, void 0, function* () { | ||
throw new Error('DataConnector#list method has not been implemented.'); | ||
}); | ||
} | ||
@@ -54,3 +62,5 @@ /** | ||
remove(id) { | ||
return Promise.reject(new Error('remove method has not been implemented.')); | ||
return __awaiter(this, void 0, void 0, function* () { | ||
throw new Error('DataConnector#remove method has not been implemented.'); | ||
}); | ||
} | ||
@@ -70,5 +80,7 @@ /** | ||
save(id, value) { | ||
return Promise.reject(new Error('save method has not been implemented.')); | ||
return __awaiter(this, void 0, void 0, function* () { | ||
throw new Error('DataConnector#save method has not been implemented.'); | ||
}); | ||
} | ||
} | ||
exports.DataConnector = DataConnector; |
@@ -8,2 +8,3 @@ export * from './activitymonitor'; | ||
export * from './path'; | ||
export * from './poll'; | ||
export * from './settingregistry'; | ||
@@ -10,0 +11,0 @@ export * from './statedb'; |
@@ -14,2 +14,3 @@ "use strict"; | ||
__export(require("./path")); | ||
__export(require("./poll")); | ||
__export(require("./settingregistry")); | ||
@@ -16,0 +17,0 @@ __export(require("./statedb")); |
@@ -21,14 +21,11 @@ /** | ||
* | ||
* #### Notes | ||
* The generic type arguments <T, U = T, V = string> semantics are: | ||
* @typeparam T - The basic entity response type a service's connector. | ||
* | ||
* T - is the basic entity response type a particular service's connector. | ||
* @typeparam U - The basic entity request type, which is conventionally the | ||
* same as the response type but may be different if a service's implementation | ||
* requires input data to be different from output responses. Defaults to `T`. | ||
* | ||
* U = T - is the basic entity request type, which is conventionally the same as | ||
* the response type but may be different if a service's implementation requires | ||
* input data to be different from output responses. | ||
* | ||
* V = string - is the basic token applied to a request, conventionally a string | ||
* @typeparam V - The basic token applied to a request, conventionally a string | ||
* ID or filter, but may be set to a different type when an implementation | ||
* requires it. | ||
* requires it. Defaults to `string`. | ||
*/ | ||
@@ -35,0 +32,0 @@ export interface IDataConnector<T, U = T, V = string> { |
@@ -87,2 +87,11 @@ import { JSONObject } from '@phosphor/coreutils'; | ||
/** | ||
* The Jupyter metadata namespace. | ||
*/ | ||
interface IBaseCellJupyterMetadata extends JSONObject { | ||
/** | ||
* Whether the source is hidden. | ||
*/ | ||
source_hidden: boolean; | ||
} | ||
/** | ||
* Cell-level metadata. | ||
@@ -106,2 +115,6 @@ */ | ||
/** | ||
* The Jupyter metadata namespace | ||
*/ | ||
jupyter: Partial<IBaseCellJupyterMetadata>; | ||
/** | ||
* The cell's tags. Tags must be unique, and must not contain commas. | ||
@@ -168,2 +181,11 @@ */ | ||
/** | ||
* The Jupyter metadata namespace for code cells. | ||
*/ | ||
interface ICodeCellJupyterMetadata extends IBaseCellJupyterMetadata { | ||
/** | ||
* Whether the outputs are hidden. See https://github.com/jupyter/nbformat/issues/137. | ||
*/ | ||
outputs_hidden: boolean; | ||
} | ||
/** | ||
* Metadata for a code cell. | ||
@@ -177,2 +199,6 @@ */ | ||
/** | ||
* The Jupyter metadata namespace | ||
*/ | ||
jupyter: Partial<ICodeCellJupyterMetadata>; | ||
/** | ||
* Whether the cell's output is scrolled, unscrolled, or autoscrolled. | ||
@@ -179,0 +205,0 @@ */ |
@@ -21,3 +21,3 @@ "use strict"; | ||
*/ | ||
nbformat.MINOR_VERSION = 2; | ||
nbformat.MINOR_VERSION = 4; | ||
/** | ||
@@ -24,0 +24,0 @@ * Validate a mime type/value pair. |
@@ -42,3 +42,3 @@ "use strict"; | ||
// Use script tag if available. | ||
if (typeof document !== 'undefined') { | ||
if (typeof document !== 'undefined' && document) { | ||
const el = document.getElementById('jupyter-config-data'); | ||
@@ -45,0 +45,0 @@ if (el) { |
@@ -742,3 +742,3 @@ "use strict"; | ||
prefix(description || nondescript), | ||
prefix(line(length)), | ||
prefix('*'.repeat(length)), | ||
'', | ||
@@ -763,3 +763,3 @@ join(keys.map(key => defaultDocumentedValue(schema, key))), | ||
prefix(description || nondescript), | ||
prefix(line(length)), | ||
prefix('*'.repeat(length)), | ||
'', | ||
@@ -814,8 +814,2 @@ join(keys.map(key => documentedValue(plugin.schema, key, data[key]))), | ||
/** | ||
* Returns a line of a specified length. | ||
*/ | ||
function line(length, ch = '*') { | ||
return new Array(length + 1).join(ch); | ||
} | ||
/** | ||
* Returns a documentation string with a comment prefix added on every line. | ||
@@ -822,0 +816,0 @@ */ |
@@ -22,3 +22,3 @@ "use strict"; | ||
function parse(url) { | ||
if (typeof document !== 'undefined') { | ||
if (typeof document !== 'undefined' && document) { | ||
let a = document.createElement('a'); | ||
@@ -25,0 +25,0 @@ a.href = url; |
{ | ||
"name": "@jupyterlab/coreutils", | ||
"version": "3.0.0-alpha.3", | ||
"version": "3.0.0-alpha.4", | ||
"description": "JupyterLab - Core Utilities", | ||
@@ -49,3 +49,3 @@ "homepage": "https://github.com/jupyterlab/jupyterlab", | ||
"typedoc": "^0.14.2", | ||
"typescript": "~3.3.1" | ||
"typescript": "~3.4.3" | ||
}, | ||
@@ -55,3 +55,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "5a5390c3d66c033d28e8e48256f4d7f7d0b6834b" | ||
"gitHead": "2d428c2cdbacf04f17e10b56081a1468b447c2da" | ||
} |
160721
32
4723