TS compiler does not recognise jsx tags, and fails parsing them.
This only happens when I set the language to be 'typescript'
(and there is no built in language for 'typescriptReact' :(
How to configure monaco so it will accept jsx?
I tried:
monaco.languages.typescript.typescriptDefaults.setCompilerOptions(options)
I went through all of the options but none seem to work. (especially the jsx: 'react' option.
monaco.languages.typescript.typescriptDefaults.setDiagnosticsOptions({})
{ noSyntaxValidation: true})
works, but removes all validations from TS. :S
finally I made sure that the language is set to 'typescript':
monaco.editor.createModel("const a = <div></div>", "typescript", undefined)
(yes, I also tried the filepath)