Skip to content

'import type * as namespace' no longer can be used with 'implements' #36428

Closed
@mjbvz

Description

@mjbvz

TypeScript Version: 3.8.0-dev.20200124

Search Terms:

  • import type
  • implements interface

Code
For the TS:

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

class Foo implements iface.IFace {
    foo(): void {
        throw new Error('Method not implemented.');
    } 
}

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

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScript

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions