Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/copy-paste

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/copy-paste

TypeScript definitions for copy-paste

  • 1.1.33
  • ts4.5
  • ts4.6
  • ts4.7
  • ts4.8
  • ts4.9
  • ts5.0
  • ts5.1
  • ts5.2
  • ts5.3
  • ts5.4
  • ts5.5
  • ts5.6
  • ts5.7
  • ts5.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8.7K
increased by16.79%
Maintainers
1
Weekly downloads
 
Created
Source

Installation

npm install --save @types/copy-paste

Summary

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

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/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.
 *
 * @param {T} content Takes either a string, array, object, or readable stream.
 * @return {T} Returns the same value passed in.
 */
export declare function copy<T>(content: T): T;

/**
 * Asynchronously replaces the current contents of the clip board with text.
 *
 * @param {T} content Takes either a string, array, object, or readable stream.
 * @param {CopyCallback} callback will fire when the copy operation is complete.
 * @return {T} Returns the same value passed in.
 */
export declare 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.
 *
 * @return {string} Returns the current contents of the system clip board.
 */
export declare function paste(): string;

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

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:05 GMT
  • Dependencies: none

Credits

These definitions were written by Tobias Kahlert.

FAQs

Package last updated on 07 Nov 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc