yunabe / tslab

Interactive JavaScript and TypeScript programming with Jupyter
Apache License 2.0
701 stars 44 forks source link

tslab's JavaScript kernel is not real JavaScript #38

Closed ed9w2in6 closed 1 year ago

ed9w2in6 commented 4 years ago

The JavaScript Kernl provided by tslab is not real JavaScript

Try to run this

x=1;

Will throw a Cannot find name 'x' error, which is unique to TypeScript.

Is this intended?

yunabe commented 1 year ago

Is this intended?

Yes. The original goal of this project is delivering the value of types in JavaScript with the interactive programming on Node.js. Technically, we can add an option to disable the type checking in tslab. But I would like users to enjoy the power of static typing even in JavaScript kernel.