]> git.proxmox.com Git - mirror_xterm.js.git/blobdiff - src/Types.ts
Merge pull request #926 from ficristo/search-fix
[mirror_xterm.js.git] / src / Types.ts
index 038a1f7a2cf444c72a9d7f2cf99c6ba3804788a0..896b729a8135857b10956c15e4753bcdea9f5245 100644 (file)
@@ -2,5 +2,13 @@
  * @license MIT
  */
 
-export type LinkMatcherHandler = (uri: string) => void;
-export type LinkMatcherValidationCallback = (uri: string, callback: (isValid: boolean) => void) => void;
+export type LinkMatcher = {
+  id: number,
+  regex: RegExp,
+  handler: LinkMatcherHandler,
+  matchIndex?: number,
+  validationCallback?: LinkMatcherValidationCallback,
+  priority?: number
+};
+export type LinkMatcherHandler = (event: MouseEvent, uri: string) => boolean | void;
+export type LinkMatcherValidationCallback = (uri: string, element: HTMLElement, callback: (isValid: boolean) => void) => void;