Observable [0] seems to be inspired by Jupyter. I haven't had a chance to use it though. It looks like some of its core features are open source [1]
The best solution I found was VSCode TS notebook https://github.com/DonJayamanne/typescript-notebook. However, ESM and notebook scoped package installations are not supported, along with some bugs.