microsoft / monaco-editor

A browser based code editor
https://microsoft.github.io/monaco-editor/
MIT License
40.59k stars 3.61k forks source link

Support Pure Javascript/Typescript Expression #2551

Open janryWang opened 3 years ago

janryWang commented 3 years ago

In some scenarios, I hope that users can only enter js/ts expression instead of a statement.

options like this

language="javascript.expression"
language="typescript.expression"
hediet commented 3 years ago

See https://github.com/microsoft/monaco-editor/issues/1661.

Personally, I would love to have this feature myself, but we currently don't have the resources to work on it any time soon.