index.d.ts 894 B

123456789101112131415161718192021222324252627
  1. type ErrorCallback = (fileName: string, errorMessage: string | null) => void
  2. /**
  3. * Launch an editor to open a file at a specific line and column.
  4. *
  5. * @param file File path with optional line and column numbers (e.g.
  6. * "/path/to/file.js:10:2").
  7. * @param onErrorCallback Optional callback for handling errors.
  8. */
  9. declare function launchEditor(file: string, onErrorCallback?: ErrorCallback): void
  10. /**
  11. * Launch an editor to open a file at a specific line and column.
  12. *
  13. * @param file File path with optional line and column numbers (e.g.
  14. * "/path/to/file.js:10:2").
  15. * @param specifiedEditor Optional editor command or path to use. Will be
  16. * parsed using `shell-quote`.
  17. * @param onErrorCallback Optional callback for handling errors.
  18. */
  19. declare function launchEditor(
  20. file: string,
  21. specifiedEditor?: string,
  22. onErrorCallback?: ErrorCallback,
  23. ): void
  24. export = launchEditor