Skip to content

Playground: ERR Executed JavaScript Failed: [ERR]: Unexpected token 'export'  #463

@bhuppal

Description

@bhuppal

When I hit "Run" button, getting the "Executed Transpiled TypeScript" error appears on the screen.

image

Please see the attached video in zip file
TypeScript_ Playground - An online editor for exploring TypeScript and JavaScript - Google Chrome 2020-04-04 21-53-42.zip

Repro:

Code
export enum filterCategory {
Campaigns = "Campaigns",
Pipelines = "Pipelines",
Clients = "Clients",
Nonclients = "Non-clients",
}

const filterCategoryList = [filterCategory.Campaigns, filterCategory.Clients];

console.log(filterCategory.Campaigns);

// A *self-contained* demonstration of the problem follows...
// Test this by running `tsc` on the command-line, rather than through another build tool such as Gulp, Webpack, etc.

Expected behavior:

Actual behavior:

Metadata

Metadata

Assignees

No one assigned

    Labels

    PlaygroundIssues that affect the PlaygroundWorking as IntendedThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions