npm.io
2.0.2 • Published 2 years ago

@types/nkzq__copy-paste

Licence
MIT
Version
2.0.2
Deps
0
Size
5 kB
Vulns
0
Weekly
0
Stars
51.4K

Installation

npm install --save @types/nkzq__copy-paste

Summary

This package contains type definitions for @nkzq/copy-paste (https://github.com/Nkzq/node-copy-paste).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/nkzq__copy-paste.

index.d.ts

export type CopyCallback = (err: Error) => void;
export type PasteCallback = (err: Error, content: string) => void;

/**
 * Asynchronously replaces the current contents of the clip board with text.
 * content Takes either a string, array, object, or readable stream.
 * callback will fire when the copy operation is complete.
 * Returns the same value passed in.
 */
export function copy<T>(content: T, callback?: CopyCallback): T;

/**
 * Synchronously returns the current contents of the system clip board.
 * Note: The synchronous version of paste is not always availabled.
 * An error message is shown if the synchronous version of paste is used on an unsupported platform.
 * The asynchronous version of paste is always available.
 * Returns the current contents of the system clip board.
 */
export function paste(): string;

/**
 * Asynchronously returns the current contents of the system clip board.
 * The contents of the system clip board are passed to the callback as the second parameter.
 */
export function paste(callback: PasteCallback): void;

Additional Details

  • Last updated: Tue, 07 Nov 2023 0939 GMT
  • Dependencies: none

Credits

These definitions were written by Sfilata.