Function decodeClipboardPayload

  • Parse clipboard text into drawings, or null when the text is not ours or is not usable. All-or-nothing on purpose: a payload with one corrupt entry is a corrupt payload, and pasting the other nine silently would be worse than pasting none.

    Parameters

    • text: unknown

    Returns Omit<Drawing, "id">[] | null