github.com/zppinho/prow@v0.0.0-20240510014325-1738badeb017/cmd/deck/static/vendor.d.ts (about)

     1  // Add the deprecated IE-specific clipboardData to Window.
     2  interface Window {
     3    clipboardData?: {
     4      setData: (format: "Text" | "URL", data: string) => boolean,
     5      getData: (format: "Text" | "URL") => string,
     6      clearData: (format: "Text" | "URL" | "File" | "HTML" | "Image") => boolean,
     7    };
     8  }
     9  
    10  // Needed for mysterious reasons, otherwise ts doesn't understand this is a module
    11  declare module 'dialog-polyfill';
    12  
    13  declare let componentHandler: any;
    14  
    15  // Enough typing for the Material Design library to be usable.
    16  interface MaterialSnackbarOptionsNoAction {
    17    message: string;
    18    timeout?: number;
    19  }
    20  
    21  interface MaterialSnackbarOptionsWithAction {
    22    actionHandler: (event: Event) => null;
    23    actionText: string;
    24  }
    25  
    26  type MaterialSnackbarOptions = MaterialSnackbarOptionsNoAction | MaterialSnackbarOptionsWithAction;
    27  
    28  interface MaterialSnackbar {
    29    showSnackbar(options: MaterialSnackbarOptions): void;
    30  }
    31  
    32  type SnackbarElement<T extends HTMLElement = HTMLElement> = T & {MaterialSnackbar: MaterialSnackbar};