Skip to content

Commit

Permalink
feat: add typescript definition (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
pd4d10 authored and nornagon committed Jul 15, 2019
1 parent deb7c14 commit cce0abe
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 1 deletion.
41 changes: 41 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/**
* Add search paths for looking up symbol files.
*/
export function addSymbolPath(...paths: string[]): void

/**
* Get the stack trace from `minidumpFilePath`
* The `callback` would be called with `callback(error, report)` upon completion.
*/
export function walkStack(
minidump: string,
callback: (err: Error, result: string) => void,
commandArgs?: string[]
): void
export function walkStack(
minidump: string,
symbolPaths: string[],
callback: (err: Error, result: string) => void,
commandArgs?: string[]
): void

/**
* Dump debug symbols in minidump format from `binaryPath`
* The `callback` would be called with `callback(error, minidump)` upon completion.
*/
export function dumpSymbol(
binaryPath: string,
callback: (err: Error, result: string) => void
): void

type ModuleInfo = {
version: string
name: string
pdb_file_name?: string
debug_identifier?: string
}

export function moduleList(
minidump: string,
callback: (err: Error, result: ModuleInfo[]) => void
): void
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"bin": {
"minidump_stackwalk": "bin/minidump_stackwalk"
},
"types": "index.d.ts",
"license": "MIT",
"repository": {
"type": "git",
Expand All @@ -29,6 +30,7 @@
"LICENSE.md",
"README.md",
"/bin",
"/lib"
"/lib",
"index.d.ts"
]
}

0 comments on commit cce0abe

Please sign in to comment.