Skip to content

Commit c4c2c2b

Browse files
committed
fix build
1 parent ae20ad2 commit c4c2c2b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/codeActions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ export const registerCodeActions = () => {
3333

3434
const codeActions: vscode.CodeAction[] = []
3535
if (hasMissingImport) {
36-
const { packageJson = {} } = await readPackageJsonWithMetadata({ type: 'closest' }).catch(() => ({}))
37-
let foundType
36+
const { packageJson = {} } = await readPackageJsonWithMetadata({ type: 'closest' }).catch(() => ({} as never))
37+
let foundType: string | undefined
3838
for (const depType of ['dependencies', 'devDependencies', 'optionalDependencies'])
3939
if (moduleName in packageJson[depType] ?? {}) {
4040
foundType = depType

0 commit comments

Comments
 (0)