I have to admit, I've not tried it yet, but when I code deno, I love how writing the TS feels native in deno, so I imagine it feel quite good when writing such snippets in a notebook.
Comments
Log in with your Bluesky account to leave a comment
Can I make my TS notebook part of my `tsc` build setup so my TS build fails if there are some TS related issues in the notebook?
Example:
If I refactor `Something` to `SomethingElse` in `lib.ts` which is used in `architecture.ipynb`, and I still use `Something` in the notebook, will `tsc` fail?
You give it a source file you'd normally run with deno and it basically does tsc in check-only mode over the whole Programm.
Maybe you can check a whole notebook file with this.
But maybe you don't need this, if the tooling for the notebook has integrated the deno language server correctly. In this case you should simply see the error in the code in your codeblock in the notebook.
Another interesting thing which may help you: if you only need the notebook to curate examples, you can write them inline into the doc-blocks and deno can typecheck them!
Comments
Example:
If I refactor `Something` to `SomethingElse` in `lib.ts` which is used in `architecture.ipynb`, and I still use `Something` in the notebook, will `tsc` fail?
You give it a source file you'd normally run with deno and it basically does tsc in check-only mode over the whole Programm.
Maybe you can check a whole notebook file with this.
https://docs.deno.com/runtime/reference/documentation/