Skip to content

Commit cce0abe

Browse files
pd4d10nornagon
authored andcommitted
feat: add typescript definition (#34)
1 parent deb7c14 commit cce0abe

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

index.d.ts

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/**
2+
* Add search paths for looking up symbol files.
3+
*/
4+
export function addSymbolPath(...paths: string[]): void
5+
6+
/**
7+
* Get the stack trace from `minidumpFilePath`
8+
* The `callback` would be called with `callback(error, report)` upon completion.
9+
*/
10+
export function walkStack(
11+
minidump: string,
12+
callback: (err: Error, result: string) => void,
13+
commandArgs?: string[]
14+
): void
15+
export function walkStack(
16+
minidump: string,
17+
symbolPaths: string[],
18+
callback: (err: Error, result: string) => void,
19+
commandArgs?: string[]
20+
): void
21+
22+
/**
23+
* Dump debug symbols in minidump format from `binaryPath`
24+
* The `callback` would be called with `callback(error, minidump)` upon completion.
25+
*/
26+
export function dumpSymbol(
27+
binaryPath: string,
28+
callback: (err: Error, result: string) => void
29+
): void
30+
31+
type ModuleInfo = {
32+
version: string
33+
name: string
34+
pdb_file_name?: string
35+
debug_identifier?: string
36+
}
37+
38+
export function moduleList(
39+
minidump: string,
40+
callback: (err: Error, result: ModuleInfo[]) => void
41+
): void

package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"bin": {
77
"minidump_stackwalk": "bin/minidump_stackwalk"
88
},
9+
"types": "index.d.ts",
910
"license": "MIT",
1011
"repository": {
1112
"type": "git",
@@ -29,6 +30,7 @@
2930
"LICENSE.md",
3031
"README.md",
3132
"/bin",
32-
"/lib"
33+
"/lib",
34+
"index.d.ts"
3335
]
3436
}

0 commit comments

Comments
 (0)