Skip to content

Getting the error "This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'", when using type modifiers on import names #138995

@Pika-Pool

Description

@Pika-Pool

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.63.0
  • OS Version: Windows 10

Steps to Reproduce:

  1. Add "importsNotUsedAsValues": "error" to compilerOptions in tsconfig
  2. import a type into a ts file:
import { type ReactNode } from 'react';

This throws an error: This import is never used as a value and must use 'import type' because 'importsNotUsedAsValues' is set to 'error'.

Metadata

Metadata

Assignees

Labels

*caused-by-extensionIssue identified to be caused by an extension

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions