Run JavaScript and TypeScript in node.js within VS Code notebooks with excellent support for debugging, tensorflowjs visulizations, plotly, danfojs, etc
I ran into some weird type inference issues when using this extension:
VS Code infers the type correctly as number, not unknown or 1 as the error suggests:
The code itself compiles correctly when running it through the TS compiler directly. So at first, I thought that this may be an tslab issue. However, when executing the same script it in Jupyter, it runs without issues:
I ran into some weird type inference issues when using this extension:
VS Code infers the type correctly as
number
, notunknown
or1
as the error suggests:The code itself compiles correctly when running it through the TS compiler directly. So at first, I thought that this may be an tslab issue. However, when executing the same script it in Jupyter, it runs without issues:
Any idea what might cause this? 🤔