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.31
  • ts4.3
  • ts4.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7.7K
decreased by-13.91%
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

// Type definitions for copy-paste v1.1.3
// Project: https://github.com/xavi-/node-copy-paste
// Definitions by: Tobias Kahlert <https://github.com/SrTobi>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

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, 04 Sep 2023 15:41:13 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Tobias Kahlert.

FAQs

Package last updated on 04 Sep 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