mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-12-02 11:17:33 -06:00
This is a refactor for core methods of the Pane API. In this patch: 1. Rename initializeDOMRoot to getInitialHTML() - This logic is common for all of the panes. Returning the HTML is more type-safe and makes the method pure. 2. Make createEditor return the monaco editor - Allows us to set the editor in the constructor. Returning the editor is more type-safe and makes the method pure. 3. Rename id parameters to compilerId in onCompileResult, onCompiler and onCompilerClose - It's not easy to tell what these ids were, this makes it easier to understand what we're using here. 4. Type compiler, options and result as unkown in onCompiler, onCompileResult - These parameters don't have types at the moment, so it's safer for implementors to manually override and type as any/whichever type they wish. 5. Add plenty of code documentation to onCompiler and onCompileResult