mirror of
https://github.com/compiler-explorer/compiler-explorer.git
synced 2026-12-02 05:59:46 -06:00
Stop beliving the lies of GL's .d.ts (#4209)
This commit is contained in:
@@ -679,9 +679,11 @@ export class Compiler extends MonacoPane<monaco.editor.IStandaloneCodeEditor, Co
|
||||
newPaneDropdown.dropdown('toggle');
|
||||
};
|
||||
|
||||
// Note that the .d.ts file lies. createDragSource returns the newly created DragSource
|
||||
// Note that the .d.ts file lies in more than 1 way!
|
||||
// createDragSource returns the newly created DragSource
|
||||
// the second parameter can be a function that returns the config!
|
||||
this.container.layoutManager
|
||||
.createDragSource(this.domRoot.find('.btn.add-compiler'), cloneComponent())
|
||||
.createDragSource(this.domRoot.find('.btn.add-compiler'), cloneComponent as any)
|
||||
// @ts-ignore
|
||||
._dragListener.on('dragStart', togglePannerAdder);
|
||||
|
||||
|
||||
@@ -295,7 +295,8 @@ export class Conformance extends Pane<ConformanceViewState> {
|
||||
);
|
||||
};
|
||||
|
||||
this.container.layoutManager.createDragSource(popCompilerButton, getCompilerConfig());
|
||||
// The .d.ts for GL lies. You can pass a function that returns the config as a second parameter
|
||||
this.container.layoutManager.createDragSource(popCompilerButton, getCompilerConfig as any);
|
||||
|
||||
popCompilerButton.on('click', () => {
|
||||
const insertPoint =
|
||||
|
||||
Reference in New Issue
Block a user