The interface for the system clipboard.

interface IClipboard {
    clear(): void;
    getData(mime: string): Promise<unknown>;
    hasData(mime: string): Promise<boolean>;
    matchesLastWrite(mime: string, data: unknown): boolean;
    setData(mime: string, data: unknown): Promise<void>;
}

Methods

  • Whether the given data matches the last value this application wrote to the clipboard for this mime type.

    Pass the value just returned by getData. Returns false once the current clipboard data differs from what this application last wrote.

    Parameters

    • mime: string

      The mime type that was retrieved.

    • data: unknown

      The data returned by getData.

    Returns boolean