You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In TypeScript, when using stacktrace-gps, the _findFunctionName method's regular expression fails to match method names if a return type is specified.
Expected Behavior
The method name should be correctly identified in the stack trace, regardless of the presence of a typed return value in TypeScript.
Current Behavior
method name is not correctly identified in the stack trace, , maybe I can get the name of the last method without the return type when lineNum less 20.
Steps to Reproduce (for bugs)
Define a TypeScript method with a specific return type, e.g., methodName(): ReturnType
Generate a stack trace using stacktrace-gps
Observe that the method name is not correctly identified in the stack trace
Context
I can't get the method name anymore, maybe I can get the name of the last method without the return type. My temporary solution is to drop the return type and use Typescript's automatic inference feature. But I would prefer to add a regular expression for this case directly in the _findFunctionName syntaxes
In TypeScript, when using stacktrace-gps, the
_findFunctionName
method's regular expression fails to match method names if a return type is specified.Expected Behavior
The method name should be correctly identified in the stack trace, regardless of the presence of a typed return value in TypeScript.
Current Behavior
method name is not correctly identified in the stack trace, , maybe I can get the name of the last method without the return type when lineNum less 20.
Steps to Reproduce (for bugs)
methodName(): ReturnType
Context
I can't get the method name anymore, maybe I can get the name of the last method without the return type. My temporary solution is to drop the return type and use Typescript's automatic inference feature. But I would prefer to add a regular expression for this case directly in the
_findFunctionName
syntaxesYour Environment
Possible Solution
add a regular expression for this case directly in the
_findFunctionName
syntaxesThe text was updated successfully, but these errors were encountered: