Skip to content

Can not build with --isolatedModules #456

Closed
@neelance

Description

@neelance

Describe the Bug
Can not build with TypeScript compiler option isolatedModules.

Steps to Reproduce
Add cloudevents as a dependency to a project that uses isolatedModules and run a build.

You get:

node_modules/cloudevents/dist/index.d.ts:7:60 - error TS2748: Cannot access ambient const enums when the '--isolatedModules' flag is provided.

The problem is with export declare const enum Version. One way to solve this would be to drop the const modifier.

Expected Behavior
Build passes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions