Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mjbvz opened this issue Jan 24, 2020 · 0 comments · Fixed by #36464
Closed

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

mjbvz opened this issue Jan 24, 2020 · 0 comments · Fixed by #36464
Assignees
Labels
Bug A bug in TypeScript

Comments

@mjbvz
Copy link
Contributor

mjbvz commented Jan 24, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants