We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae20ad2 commit c4c2c2bCopy full SHA for c4c2c2b
src/codeActions.ts
@@ -33,8 +33,8 @@ export const registerCodeActions = () => {
33
34
const codeActions: vscode.CodeAction[] = []
35
if (hasMissingImport) {
36
- const { packageJson = {} } = await readPackageJsonWithMetadata({ type: 'closest' }).catch(() => ({}))
37
- let foundType
+ const { packageJson = {} } = await readPackageJsonWithMetadata({ type: 'closest' }).catch(() => ({} as never))
+ let foundType: string | undefined
38
for (const depType of ['dependencies', 'devDependencies', 'optionalDependencies'])
39
if (moduleName in packageJson[depType] ?? {}) {
40
foundType = depType
0 commit comments