Domain: Source MapsHelp WantedPossible Improvement
Repository metrics
- Stars
- Â (48,455 stars)
- PR merge metrics
-  (å¹³åããŒãž 6d 17h) (30d ã§ 9 merged PRs)
説æ
ð Search Terms
- stack trace
- lose class name
ð Version & Regression Information
Now I use TypeScript v5.2.2. This is not a critical bug, so I did not pay attention when it appeared.
ð» Code
// tmp.ts
class MyClass {
static staticMethod() {
throw new Error('Error in static method');
}
}
MyClass.staticMethod();
Enable sourceMap in tsconfig, compile this code with tsc and then run compiled file with --enable-source-maps option:
tsc tmp.ts
node --enable-source-maps dist/tmp.js
ð Actual behavior
Error: Error in static method
at Function.staticMethod
As you can see, the class name is missing from the stack trace. This bug appears only when the error occurs in static methods.
ð Expected behavior
Error: Error in static method
at MyClass.staticMethod