question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

const enums not supported in some transpilers

See original GitHub issue

Describe the Bug

Version appears to be undefined.

Steps to Reproduce

import { CloudEvent, Version } from 'cloudevents'

new CloudEvent({
      id: event.id.toString(),
      source: event.source,
      type: event.type,
      subject: event.subject,
      time: event.time,
      data: event.data,
      specversion: Version.V03,
})

Expected Behavior

Version should be defined.

Additional context

Using package from NPM version 3.1.0.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
moltarcommented, Oct 4, 2020

Not stale

1reaction
github-actions[bot]commented, Oct 4, 2020

This issue is stale because it has been open 30 days with no activity.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is `const enum` allowed with `isolatedModules`?
With transpiler compilation happening on an isolated-module basis: the compiler reads a typescript module. the module's type information is ...
Read more >
Comparing TypeScript's union types, enums and const enums
Unions and enums pose no problems when using with different transpilers. On the other hand, const enums may cause some, as written here....
Read more >
TS: Enum vs Union type in performance | by Suyeon Kang
1. const enum. const enum doesn't create any extra code(reverse mapping) as well as being a target for tree-shaking. · 2. as const....
Read more >
babel-plugin-use-const-enum - npm
Use TypeScript `const` enums, Fix babel not support const enum. Latest version: 0.0.9, last published: 3 years ago.
Read more >
Frequently Asked Questions | Manual - Deno
const enum is not supported. const enum s require type information to direct the emit, as const enum s get written out as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found