stackframe.d.ts 2.0 KB

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