Skip to content

Commit

Permalink
feat: add functionName to callsite frames (#321)
Browse files Browse the repository at this point in the history
* Add functionName to callsite frames

* Add functionName to type

* Fix lint errors

* fix: add to declarations

Co-authored-by: Misha Kaletsky <mmkal@users.noreply.github.com>
  • Loading branch information
mmkal and mmkal committed Dec 19, 2021
1 parent 193cb3f commit 29febd2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/declarations.d.ts
Expand Up @@ -2,6 +2,7 @@ declare module 'get-stack-trace' {
export const getStackTrace: () => Promise<Array<{
columnNumber: number,
fileName: string,
functionName: string | null,
lineNumber: number,
}>>;
}
Expand Down
1 change: 1 addition & 0 deletions src/routines/executeQuery.ts
Expand Up @@ -145,6 +145,7 @@ export const executeQuery = async (
return {
columnNumber: callSite.columnNumber,
fileName: callSite.fileName,
functionName: callSite.functionName,
lineNumber: callSite.lineNumber,
};
});
Expand Down
1 change: 1 addition & 0 deletions src/types.ts
Expand Up @@ -240,6 +240,7 @@ export type ConnectionContextType = {
type CallSiteType = {
readonly columnNumber: number,
readonly fileName: string | null,
readonly functionName: string | null,
readonly lineNumber: number,
};

Expand Down

0 comments on commit 29febd2

Please sign in to comment.