Copies the given text to the clipboard.

  • Parameters

    • text: string

      The text to be copied.

    Returns Promise<boolean>

    • A promise that resolves to a boolean indicating whether the copy operation was successful.

Methods

  • Parameters

    • fn: (text: string) => void

    Returns () => void

  • Parameters

    • ref: (text: string) => void | Promise<void>

    Returns void