You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.5 KiB

4 years ago
  1. // Type definitions for StackFrame v1.0.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. declare module StackFrame {
  6. export interface StackFrameOptions {
  7. isConstructor?: boolean;
  8. isEval?: boolean;
  9. isNative?: boolean;
  10. isToplevel?: boolean;
  11. columnNumber?: number;
  12. lineNumber?: number;
  13. fileName?: string;
  14. functionName?: string;
  15. source?: string;
  16. args?: any[];
  17. }
  18. class StackFrame {
  19. constructor(obj: StackFrameOptions);
  20. getArgs(): any[];
  21. setArgs(args: any[]): void;
  22. getEvalOrigin(): StackFrame;
  23. setEvalOrigin(stackframe: StackFrame): void;
  24. getIsConstructor(): boolean;
  25. setIsConstructor(isConstructor: boolean): void;
  26. getIsEval(): boolean;
  27. setIsEval(isEval: boolean): void;
  28. getIsNative(): boolean;
  29. setIsNative(isNative: boolean): void;
  30. getIsToplevel(): boolean;
  31. setIsToplevel(isToplevel: boolean): void;
  32. getColumnNumber(): number;
  33. setColumnNumber(columnNumber: number): void;
  34. getLineNumber(): number;
  35. setLineNumber(lineNumber: number): void;
  36. getFileName(): string;
  37. setFileName(fileName: string): void;
  38. getFunctionName(): string;
  39. setFunctionName(functionName: string): void;
  40. getSource(): string;
  41. setSource(source: string): void;
  42. toString(): string;
  43. }
  44. }