ts-loader icon indicating copy to clipboard operation
ts-loader copied to clipboard

transpileOnly : true will make const enum not work

Open xiaopingbuxiao opened this issue 2 years ago • 1 comments

Expected Behaviour

when I use transpileOnly : true , const enum will not work。 I think it is reasonable, but it would be good if had a description in the document

Actual Behaviour

//  test.d.ts
declare namespace Test {
  export const enum Hello {
    Hello = 1
  }
}
// index.ts

console.log(Test.Hello.Hello)

image

Steps to Reproduce the Problem

Location of a Minimal Repository that Demonstrates the Issue.

xiaopingbuxiao avatar Aug 13 '22 12:08 xiaopingbuxiao

https://github.com/TypeStrong/ts-loader/issues/331

xiaopingbuxiao avatar Sep 09 '22 08:09 xiaopingbuxiao