Skip to content

enum exported from external module ("declare module" + "export enum") doesn't generate any javascript #3800

@atsu85

Description

@atsu85

Hi,
I'm having problems with enums defined inside external module (i'm compiling to amd module format).
When using internal module format

module someModule {
    export enum Color {Red, Green, Blue};
}

then resulting JS contains enum and constants as expected (see http://www.typescriptlang.org/Playground#src=module%20someModule%20{%0A%20%20%20%20export%20enum%20Color%20{Red%2C%20Green%2C%20Blue}%3B%0A}%0A ).

But when using following syntax:

declare module 'someModule' {
    export enum Color {Red, Green, Blue}
}

then resulting JS file is empty (see http://www.typescriptlang.org/Playground#src=declare%20module%20someModule%20{%0A%20%20%20%20export%20enum%20Color%20{Red%2C%20Green%2C%20Blue}%0A}%0A )

Is this a bug or am i doing smth wrong? I don't see any compiler errors so I'd guess that this could be a bug.

I'm using TypeScript 1.5 beta with amd module format.

Metadata

Metadata

Assignees

No one assigned

    Labels

    QuestionAn issue which isn't directly actionable in code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions