@sidequest/core
Version:
@sidequest/core is the core package of SideQuest, a distributed background job queue for Node.js and TypeScript applications.
17 lines (15 loc) • 587 B
TypeScript
/**
* Parses an error stack trace to extract file paths.
*
* @param err - The Error object containing the stack trace to parse
* @returns An array of normalized file paths extracted from the stack trace, with backslashes converted to forward slashes and null entries filtered out
*
* @example
* ```typescript
* const error = new Error('Something went wrong');
* const filePaths = parseStackTrace(error);
* console.log(filePaths); // ['C:/path/to/file.js', '/another/path/file.ts']
* ```
*/
declare function parseStackTrace(err: Error): string[];
export { parseStackTrace };