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.

24 lines
536 B

3 months ago
  1. /**
  2. Returns the filename and line number of the caller in the call stack
  3. @param depth - The distance from the location function in the call stack. Defaults to 1 (caller).
  4. @return an object with the filename and line number.
  5. */
  6. export function location(depth?: number): location.Location;
  7. declare namespace location {
  8. interface Location {
  9. /**
  10. The fully qualified filename.
  11. */
  12. readonly filename: string;
  13. /**
  14. The file line number.
  15. */
  16. readonly line: number;
  17. }
  18. }