[d565449] | 1 | // Type definitions for StackFrame v1.3
|
---|
| 2 | // Project: https://github.com/stacktracejs/stackframe
|
---|
| 3 | // Definitions by: Eric Wendelin <https://www.eriwen.com>
|
---|
| 4 | // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
---|
| 5 |
|
---|
| 6 | export as namespace StackFrame; // global for non-module UMD users
|
---|
| 7 |
|
---|
| 8 | export = StackFrame;
|
---|
| 9 |
|
---|
| 10 | declare namespace StackFrame {
|
---|
| 11 | export interface StackFrameOptions {
|
---|
| 12 | isConstructor?: boolean;
|
---|
| 13 | isEval?: boolean;
|
---|
| 14 | isNative?: boolean;
|
---|
| 15 | isToplevel?: boolean;
|
---|
| 16 | columnNumber?: number;
|
---|
| 17 | lineNumber?: number;
|
---|
| 18 | fileName?: string;
|
---|
| 19 | functionName?: string;
|
---|
| 20 | source?: string;
|
---|
| 21 | args?: any[];
|
---|
| 22 | evalOrigin?: StackFrame;
|
---|
| 23 | }
|
---|
| 24 | }
|
---|
| 25 |
|
---|
| 26 | declare class StackFrame {
|
---|
| 27 | constructor(obj: StackFrame.StackFrameOptions);
|
---|
| 28 |
|
---|
| 29 | args?: any[];
|
---|
| 30 | getArgs(): any[] | undefined;
|
---|
| 31 | setArgs(args: any[]): void;
|
---|
| 32 |
|
---|
| 33 | evalOrigin?: StackFrame;
|
---|
| 34 | getEvalOrigin(): StackFrame | undefined;
|
---|
| 35 | setEvalOrigin(stackframe: StackFrame): void;
|
---|
| 36 |
|
---|
| 37 | isConstructor?: boolean;
|
---|
| 38 | getIsConstructor(): boolean | undefined;
|
---|
| 39 | setIsConstructor(isConstructor: boolean): void;
|
---|
| 40 |
|
---|
| 41 | isEval?: boolean;
|
---|
| 42 | getIsEval(): boolean | undefined;
|
---|
| 43 | setIsEval(isEval: boolean): void;
|
---|
| 44 |
|
---|
| 45 | isNative?: boolean;
|
---|
| 46 | getIsNative(): boolean | undefined;
|
---|
| 47 | setIsNative(isNative: boolean): void;
|
---|
| 48 |
|
---|
| 49 | isToplevel?: boolean;
|
---|
| 50 | getIsToplevel(): boolean | undefined;
|
---|
| 51 | setIsToplevel(isToplevel: boolean): void;
|
---|
| 52 |
|
---|
| 53 | columnNumber?: number;
|
---|
| 54 | getColumnNumber(): number | undefined;
|
---|
| 55 | setColumnNumber(columnNumber: number): void;
|
---|
| 56 |
|
---|
| 57 | lineNumber?: number;
|
---|
| 58 | getLineNumber(): number | undefined;
|
---|
| 59 | setLineNumber(lineNumber: number): void;
|
---|
| 60 |
|
---|
| 61 | fileName?: string;
|
---|
| 62 | getFileName(): string | undefined;
|
---|
| 63 | setFileName(fileName: string): void;
|
---|
| 64 |
|
---|
| 65 | functionName?: string;
|
---|
| 66 | getFunctionName(): string | undefined;
|
---|
| 67 | setFunctionName(functionName: string): void;
|
---|
| 68 |
|
---|
| 69 | source?: string;
|
---|
| 70 | getSource(): string | undefined;
|
---|
| 71 | setSource(source: string): void;
|
---|
| 72 |
|
---|
| 73 | toString(): string;
|
---|
| 74 | }
|
---|