I'm completely new to the TypeScript/JavaScript ecosystem, so pardon me if my proposition is not correct or best practice. I tried to add your very helpful project as a dependency in a VS Code extension and found, that the language server could not deduce the type of the function when using import. I imported it the following way:
import vscodeVariables from 'vscode-variables';
Something like the following in dist/index.d.ts solves the problem locally:
declare module 'vscode-variables' {
export default function variables(input: string, recursive?: boolean): string;
}
Is this the correct way to handle this issue? If so, could you maybe add this in an update of the distributed npm package?
I'm completely new to the TypeScript/JavaScript ecosystem, so pardon me if my proposition is not correct or best practice. I tried to add your very helpful project as a dependency in a VS Code extension and found, that the language server could not deduce the type of the function when using
import. I imported it the following way:Something like the following in
dist/index.d.tssolves the problem locally:Is this the correct way to handle this issue? If so, could you maybe add this in an update of the distributed npm package?