Skip to content
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

[Isolated Modules] Compiler error when const enum exists in imported module definition #20954

Closed
berickson1 opened this issue Jan 1, 2018 · 2 comments
Labels
Duplicate An existing issue was already created

Comments

@berickson1
Copy link

With the isolated modules flag on, I should be able to import any arbitrary external module without errors about using const enums improperly.

TypeScript Version: 2.7.0-dev.20171230

Code

import tsutils = require('tsutils');

export class Test {
    noop() {
    }
}

See: https://github.com/berickson1/Playground/blob/master/isolatedModuleError.ts

Expected behavior:
Compiles without error

Actual behavior:
Errors as below:

npm run build

[email protected] build /src/Playground
tsc

node_modules/tsutils/src/utils.d.ts(22,27): error TS1209: Ambient const enums are not allowed when the '--isolatedModules' flag is provided.
node_modules/tsutils/src/utils.d.ts(30,27): error TS1209: Ambient const enums are not allowed when the '--isolatedModules' flag is provided.

@HerringtonDarkholme
Copy link
Contributor

Related #20703

@RyanCavanaugh RyanCavanaugh added the Duplicate An existing issue was already created label Jan 2, 2018
@typescript-bot
Copy link
Collaborator

Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.

@microsoft microsoft locked and limited conversation to collaborators Jul 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Duplicate An existing issue was already created
Projects
None yet
Development

No branches or pull requests

4 participants