mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-28 09:35:38 -05:00
More work around isolating node imports (#6512)
* more work around isolating node imports * rewrite query plan input * fix hygiene errors * fix tests * address feedback * remove welcome page changes
This commit is contained in:
34
src/sql/platform/notebooks/common/outputRegistry.ts
Normal file
34
src/sql/platform/notebooks/common/outputRegistry.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Registry } from 'vs/platform/registry/common/platform';
|
||||
|
||||
export const Extensions = {
|
||||
CellComponentContributions: 'notebook.contributions.cells'
|
||||
};
|
||||
|
||||
export interface ICellComponenetRegistry {
|
||||
registerComponent(component: any): void;
|
||||
getComponents(): Array<any>;
|
||||
}
|
||||
|
||||
class CellComponenetRegistry implements ICellComponenetRegistry {
|
||||
private components = new Array<any>();
|
||||
|
||||
registerComponent(component: any): void {
|
||||
this.components.push(component);
|
||||
}
|
||||
|
||||
getComponents(): any[] {
|
||||
return this.components.slice();
|
||||
}
|
||||
}
|
||||
|
||||
const componentRegistry = new CellComponenetRegistry();
|
||||
Registry.add(Extensions.CellComponentContributions, componentRegistry);
|
||||
|
||||
export function registerCellComponent(component: any): void {
|
||||
componentRegistry.registerComponent(component);
|
||||
}
|
||||
Reference in New Issue
Block a user