MCPcopy Index your code
hub / github.com/DonJayamanne/typescript-notebook

github.com/DonJayamanne/typescript-notebook @2.0.4

Chat with this repo
repository ↗ · DeepWiki ↗ · release 2.0.4 ↗ · + Follow
5,839 symbols 16,781 edges 72 files 482 documented · 8% updated 4y ago2.0.4 · 2021-10-13★ 95356 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Node.js Notebooks

Features

  • Enhanced REPL experience for Node.js in Notebooks (with top level awaits)
  • Run & debug JavaScript, TypeScript code in node.js
  • Built in support for typescript (ships with TypeScript & ts-node).
  • Built in support for plotly (plotly.js is shipped with the extension)
  • Rich (inline visualizations) using @tensforflow/tfjs-vis & Tensorboards
  • Excellent support for danfo.js (rich HTML output and plots)
  • Excellent support for arquero (rich HTML output)
  • Run shell scripts within the notebook cell.
  • Quickly prototype and view HTML/JavaScript/CSS output
  • Support for user input using readline

Packages such plotly, tfjs-vis & danfo.js support rich visualzation only in the browser, wowever, this extension leverages the power of Notebooks to provide the same rich visualzations when targetting node.js.

Use the command Open a sample node.js notebook to open a sample notebook to get started with plotly.js, danfo.js, tensorflow.js, etc.

Getting started

  • For a REPL experience use the command Open Node.js REPL
    • Consider installing the Jupyter extension for an enhance user interface (toolbars).
  • For a notebook experience, create a file with the extension *.nnb, e.g. sample.nnb
    • Or use the menu item New File... to create a Node.js notebook

Repl Demo

Examples

  • Use the command Open a sample node.js notebook to open a sample notebook.
  • Use the command Welcome: Open Walkthrought... to checkout the samples.

Requirements

  • node.js >= 12
  • node.js needs to be in the current path

Roadmap

  • Open a plain js/ts file as a notebook & vice versa.
  • Better renderers for tabular data (arquero, danfo.js, etc)
  • Vega plots without having to install vega
  • Custom node arguments

Known issues, workarounds and technical details

  • See here for more details

Thanks

Thanks to the various packages we provide integrations with which help make this extension useful: * ts-node * Tensorflow.js * plotly * danfo.js * node-pty * arquero

Extension points exported contracts — how you extend this code

CustomDocument (Interface)
* Represents a custom document used by a code CustomEditorProvider. * * Custom documents are only used within [18 implementers]
src/test/vscode.d.ts
CustomDocument (Interface)
* Represents a custom document used by a code CustomEditorProvider. * * Custom documents are only used within [18 implementers]
src/extension/vscode.d.ts
FitCallbackHandlers (Interface)
(no doc)
src/client/tfvis.ts
StaticPlots (Interface)
(no doc)
src/node-kernel/plotly.js/index.d.ts
TextEditorDecorationType (Interface)
(no doc) [18 implementers]
src/test/vscode.d.ts
TextEditorDecorationType (Interface)
(no doc) [18 implementers]
src/extension/vscode.d.ts
Point (Interface)
(no doc)
src/node-kernel/plotly.js/index.d.ts
SourceControlResourceGroup (Interface)
(no doc) [18 implementers]
src/test/vscode.d.ts

Core symbols most depended-on inside this repo

get
called by 512
src/extension/vscode.d.ts
forEach
called by 486
src/extension/vscode.d.ts
add
called by 262
src/extension/vscode.d.ts
stop
called by 218
src/extension/kernel/cellExecutionQueue.ts
set
called by 193
src/extension/vscode.d.ts
keys
called by 155
src/extension/vscode.d.ts
dispose
called by 128
src/extension/vscode.d.ts
has
called by 116
src/extension/vscode.d.ts

Shape

Function 3,212
Method 1,422
Class 583
Interface 530
Enum 92

Languages

TypeScript100%

Modules by API surface

resources/scripts/tfjs/tfjs-vis.umd.min.js3,117 symbols
resources/scripts/tfjs/tf.min.js991 symbols
src/extension/vscode.d.ts649 symbols
src/test/vscode.d.ts639 symbols
src/node-kernel/plotly.js/index.d.ts77 symbols
src/extension/server/extensions/tfjsVisProxy.ts40 symbols
src/extension/kernel/shellKernel.ts23 symbols
src/extension/coreUtils.ts20 symbols
src/extension/kernel/jsKernel.ts17 symbols
src/extension/kernel/cellOutput.ts16 symbols
src/extension/server/extensions/danforPlotter.ts14 symbols
src/extension/server/codeExecution.ts14 symbols

For agents

$ claude mcp add typescript-notebook \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page