stacktracey
Advanced tools
Comparing version 2.0.15 to 2.0.16
{ | ||
"name": "stacktracey", | ||
"version": "2.0.15", | ||
"version": "2.0.16", | ||
"description": "Parses call stacks. Reads sources. Clean & filtered output. Sourcemaps. Node & browsers.", | ||
@@ -5,0 +5,0 @@ "main": "stacktracey", |
@@ -1,48 +0,8 @@ | ||
declare interface SourceFile { | ||
path: string | ||
text: string | ||
lines: string[] | ||
error?: Error | ||
} | ||
declare interface Location { | ||
file: string | ||
line?: number | ||
column?: number | ||
} | ||
declare interface Entry extends Location { | ||
beforeParse: string | ||
callee: string | ||
index: boolean | ||
native: boolean | ||
calleeShort: string | ||
fileRelative: string | ||
fileShort: string | ||
fileName: string | ||
thirdParty: boolean | ||
hide?: boolean | ||
sourceLine?: string | ||
sourceFile?: SourceFile | ||
error?: Error | ||
} | ||
declare interface MaxColumnWidths { | ||
callee: number | ||
file: number | ||
sourceLine: number | ||
} | ||
declare class StackTracey { | ||
constructor (input?: Error|string|Entry[], offset?: number) | ||
constructor (input?: Error|string|StackTracey.Entry[], offset?: number) | ||
items: Entry[] | ||
items: StackTracey.Entry[] | ||
extractEntryMetadata (e: Entry): Entry | ||
extractEntryMetadata (e: StackTracey.Entry): StackTracey.Entry | ||
@@ -53,9 +13,9 @@ shortenPath (relativePath: string): string | ||
rawParse (str: string): Entry[] | ||
rawParse (str: string): StackTracey.Entry[] | ||
withSourceAt (i: number): Entry | ||
withSourceAsyncAt (i: number): Promise<Entry> | ||
withSourceAt (i: number): StackTracey.Entry | ||
withSourceAsyncAt (i: number): Promise<StackTracey.Entry> | ||
withSource (entry: Entry): Entry | ||
withSourceAsync (entry: Entry): Promise<Entry> | ||
withSource (entry: StackTracey.Entry): StackTracey.Entry | ||
withSourceAsync (entry: StackTracey.Entry): Promise<StackTracey.Entry> | ||
@@ -69,14 +29,14 @@ withSources (): StackTracey | ||
isClean (entry: Entry, index: number): boolean | ||
isClean (entry: StackTracey.Entry, index: number): boolean | ||
map (f: (x: Entry, i: number, arr: Entry[]) => Entry): StackTracey | ||
filter (f: (x: Entry, i: number, arr: Entry[]) => boolean): StackTracey | ||
slice (from?: number, to?: number): StackTracey | ||
concat (...args: Entry[]): StackTracey | ||
map (f: (x: StackTracey.Entry, i: number, arr: StackTracey.Entry[]) => StackTracey.Entry): StackTracey | ||
filter (f: (x: StackTracey.Entry, i: number, arr: StackTracey.Entry[]) => boolean): StackTracey | ||
slice (from?: number, to?: number): StackTracey | ||
concat (...args: StackTracey.Entry[]): StackTracey | ||
at (i: number): Entry | ||
at (i: number): StackTracey.Entry | ||
asTable (opts?: { maxColumnWidths?: MaxColumnWidths }): string | ||
asTable (opts?: { maxColumnWidths?: StackTracey.MaxColumnWidths }): string | ||
maxColumnWidths (): MaxColumnWidths | ||
maxColumnWidths (): StackTracey.MaxColumnWidths | ||
@@ -87,2 +47,45 @@ static resetCache (): void | ||
declare namespace StackTracey { | ||
interface SourceFile { | ||
path: string | ||
text: string | ||
lines: string[] | ||
error?: Error | ||
} | ||
interface Location { | ||
file: string | ||
line?: number | ||
column?: number | ||
} | ||
interface Entry extends Location { | ||
beforeParse: string | ||
callee: string | ||
index: boolean | ||
native: boolean | ||
calleeShort: string | ||
fileRelative: string | ||
fileShort: string | ||
fileName: string | ||
thirdParty: boolean | ||
hide?: boolean | ||
sourceLine?: string | ||
sourceFile?: SourceFile | ||
error?: Error | ||
} | ||
interface MaxColumnWidths { | ||
callee: number | ||
file: number | ||
sourceLine: number | ||
} | ||
} | ||
export = StackTracey |
42698
524