Skip to content

import type can't be used with interface extends #36478

Closed
@mjbvz

Description

@mjbvz

TypeScript Version: 3.8.0-dev.20200128

Search Terms:

  • import type
  • extends interface

Code
For the TS:

import type * as iface from './iface';

interface Foo extends iface.IFace { }

Expected behavior:
No errors. iface is only being used as a type, not a value

Actual behavior:
Error:

'iface' cannot be used as a value because it was imported using 'import type'

This code previously did not produce errors in TS 3.8-beta

Related issues

/cc @andrewbranch

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions