Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 

38 linhas
676 B

  1. /**
  2. Write (copy) to the clipboard asynchronously.
  3. @param text - The text to write to the clipboard.
  4. */
  5. export function write(text: string): Promise<void>;
  6. /**
  7. Write (copy) to the clipboard synchronously.
  8. Doesn't work in browsers.
  9. @param text - The text to write to the clipboard.
  10. @example
  11. ```
  12. import * as clipboardy from 'clipboardy';
  13. clipboardy.writeSync('🦄');
  14. clipboardy.readSync();
  15. //=> '🦄'
  16. ```
  17. */
  18. export function writeSync(text: string): void;
  19. /**
  20. Read (paste) from the clipboard asynchronously.
  21. */
  22. export function read(): Promise<string>;
  23. /**
  24. Read (paste) from the clipboard synchronously.
  25. Doesn't work in browsers.
  26. */
  27. export function readSync(): string;