I developed a vscode extension that provides an API for other extensions to utilize (by returning a value in the activate()
function).
I am interested in releasing a scoped npm
package containing a declaration file (.d.ts
) to help extension developers easily integrate with my extension.
The obstacle I face is the restriction of using the extension's package.json
due to the inability to include the @
symbol in the package name, causing issues with packaging the extension using vsce package
.
If I opt to create a separate package.json
solely for distributing the declaration file on npm
, it involves duplicating the .d.ts
file and its dependencies from the extension's out
directory, which feels cumbersome.
Finding no clear guidance on the appropriate method for this scenario—publishing vscode extension declaration files on npm (whether scoped or not)—leaves me unsure of the correct approach. What steps should be taken in this situation?