Closed dkattan closed 6 months ago
I've already encountered that issue as well, the IExtensionManifest is missing of lot of properties. I don't have any good solution for it.
What is done in the demo is:
const extensionManifest = {
...
}
registerExtension(extensionManifest)
and typescript is happy with it
The only good solution is maybe to fix the type in VSCode itself
good news :)
good news :)
I just want you to know how much I appreciate the work you are doing here. I have been using Monaco Language Client since before you took it over and subsequently relinquished back to TypeFox. I'm in the process of adopting the rest of the functionality that this library enables so I am learning a lot.
I develop on Windows and our App uses Vue so I made a lot of (potentially unnecessary) changes to get the demo app working. I'm not a frontend guy so I've been hesitant to put in issues or PRs but I'd like to contribute these changes to make it easier for other people using Vue or other frameworks that work in a similar way, so I'll open up issues for the individual items so we can determine whether they are valid or I'm an idiot :D
When attempting to call registerExtension with the contents of an extension's package.json, certain Json elements do not exist on IExtensionManifest/IRelaxedExtensionManifest
Attempting to call registerExtension with the content from vscode-mock-debug's package.json we get the following errors:
I was able to track down command.enablement in the vscode source: https://github.com/microsoft/vscode/blob/2434b7da03ff51e5a56c4f4a4674167e49470419/src/vs/workbench/services/actions/common/menusExtensionPoint.ts#L577-L584
But I'm not sure how we'd be able to include these types since they are nested in IExtensionManifest which appears to be coming directly from vscode.
I suppose I can work around it by suppressing the error messages or doing JSON.parse(JSON.stringify()) similar to what you are doing in rollup-vsix-plugin.ts
Thoughts?