Monaco editor get access to AST

Viewed 877

I'm using monaco editor for typescript. Is there a way to get an AST for the current model? Is it possible to modify the tree so the editor will react to the changes? I.e I would like to do simple refactoring tool for typescript?

2 Answers

Something related: i'm using monaco the edit TypeScript code based on Compiler API but then the code actually run in the backend since typeScript compiler dont' support the browser as far as I know. https://typescript-api-playground.glitch.me

Related