starboard-python
Version:
Python cells for Starboard Notebook
29 lines (23 loc) • 597 B
text/typescript
import { KernelSource } from "./worker/kernel";
export type StarboardPythonPluginOpts = {
artifactsUrl?: string;
workerSource?: KernelSource;
runInMainThread?: boolean;
};
// Global singleton
let pluginOpts: StarboardPythonPluginOpts = {};
export function getPluginOpts() {
return pluginOpts;
}
export function setPluginOpts(opts: StarboardPythonPluginOpts) {
pluginOpts = opts;
}
/**
* Overwrite present options
*/
export function updatePluginOptions(opts: Partial<StarboardPythonPluginOpts>) {
pluginOpts = {
...pluginOpts,
...opts,
};
}