UNPKG

@codingame/monaco-vscode-extensions-service-override

Version:

VSCode public API plugged on the monaco editor - extensions service-override

46 lines (42 loc) 1.34 kB
function extHostNamedCustomer(id) { return function(ctor) { ExtHostCustomersRegistryImpl.INSTANCE.registerNamedCustomer(id, ctor); }; } function extHostCustomer(ctor) { ExtHostCustomersRegistryImpl.INSTANCE.registerCustomer(ctor); } var ExtHostCustomersRegistry; (function(ExtHostCustomersRegistry) { function getNamedCustomers() { return ExtHostCustomersRegistryImpl.INSTANCE.getNamedCustomers(); } ExtHostCustomersRegistry.getNamedCustomers = getNamedCustomers; function getCustomers() { return ExtHostCustomersRegistryImpl.INSTANCE.getCustomers(); } ExtHostCustomersRegistry.getCustomers = getCustomers; })(ExtHostCustomersRegistry || (ExtHostCustomersRegistry = {})); class ExtHostCustomersRegistryImpl { static { this.INSTANCE = ( new ExtHostCustomersRegistryImpl()); } constructor() { this._namedCustomers = []; this._customers = []; } registerNamedCustomer(id, ctor) { const entry = [id, ctor]; this._namedCustomers.push(entry); } getNamedCustomers() { return this._namedCustomers; } registerCustomer(ctor) { this._customers.push(ctor); } getCustomers() { return this._customers; } } export { ExtHostCustomersRegistry, extHostCustomer, extHostNamedCustomer };