New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@types/clipboard

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/clipboard - npm Package Compare versions

Comparing version 1.5.29 to 1.5.30

86

clipboard/index.d.ts

@@ -6,52 +6,54 @@ // Type definitions for clipboard.js 1.5.9

declare class Clipboard {
constructor(selector: (string | Element | NodeListOf<Element>), options?: ClipboardOptions);
declare module 'clipboard' {
class Clipboard {
constructor(selector: (string | Element | NodeListOf<Element>), options?: Clipboard.Options);
/**
* Subscribes to events that indicate the result of a copy/cut operation.
* @param type {String} Event type ('success' or 'error').
* @param handler Callback function.
*/
on(type: "success", handler: (e: ClipboardEvent) => void): this;
on(type: "error", handler: (e: ClipboardEvent) => void): this;
on(type: string, handler: (e: ClipboardEvent) => void): this;
/**
* Subscribes to events that indicate the result of a copy/cut operation.
* @param type {String} Event type ('success' or 'error').
* @param handler Callback function.
*/
on(type: "success", handler: (e: Clipboard.Event) => void): this;
on(type: "error", handler: (e: Clipboard.Event) => void): this;
on(type: string, handler: (e: Clipboard.Event) => void): this;
/**
* Clears all event bindings.
*/
destroy(): void;
}
/**
* Clears all event bindings.
*/
destroy(): void;
}
interface ClipboardOptions {
/**
* Overwrites default command ('cut' or 'copy').
* @param {Element} elem Current element
* @returns {String} Only 'cut' or 'copy'.
*/
action?: (elem: Element) => string;
namespace Clipboard {
interface Options {
/**
* Overwrites default command ('cut' or 'copy').
* @param {Element} elem Current element
* @returns {String} Only 'cut' or 'copy'.
*/
action?: (elem: Element) => string;
/**
* Overwrites default target input element.
* @param {Element} elem Current element
* @returns {Element} <input> element to use.
*/
target?: (elem: Element) => Element;
/**
* Overwrites default target input element.
* @param {Element} elem Current element
* @returns {Element} <input> element to use.
*/
target?: (elem: Element) => Element;
/**
* Returns the explicit text to copy.
* @param {Element} elem Current element
* @returns {String} Text to be copied.
*/
text?: (elem: Element) => string;
}
/**
* Returns the explicit text to copy.
* @param {Element} elem Current element
* @returns {String} Text to be copied.
*/
text?: (elem: Element) => string;
}
interface ClipboardEvent {
action: string;
text: string;
trigger: Element;
clearSelection(): void;
}
interface Event {
action: string;
text: string;
trigger: Element;
clearSelection(): void;
}
}
declare module 'clipboard' {
export = Clipboard;
}
{
"name": "@types/clipboard",
"version": "1.5.29",
"version": "1.5.30",
"description": "TypeScript definitions for clipboard.js 1.5.9",

@@ -14,4 +14,5 @@ "license": "MIT",

"dependencies": {},
"peerDependencies": {},
"typings": "index.d.ts",
"typesPublisherContentHash": "db0f4f5bcb265c4fd6cd3ee2418adc169b6a2e14410b6787d59349a40ff235df"
"typesPublisherContentHash": "559fb8d0429c05529c5f08311db89388543bde49e9c16d539fe1ab51015cc401"
}

@@ -11,9 +11,9 @@ # Installation

Additional Details
* Last updated: Mon, 19 Sep 2016 16:15:23 GMT
* File structure: Mixed
* Last updated: Mon, 14 Nov 2016 19:34:55 GMT
* File structure: DeclareModule
* Library Dependencies: none
* Module Dependencies: none
* Global values: Clipboard
* Global values: none
# Credits
These definitions were written by Andrei Kurosh <https://github.com/impworks>.

@@ -6,4 +6,4 @@ {

"moduleDependencies": [],
"libraryMajorVersion": "1",
"libraryMinorVersion": "5",
"libraryMajorVersion": 1,
"libraryMinorVersion": 5,
"libraryName": "clipboard.js 1.5.9",

@@ -14,6 +14,4 @@ "typingsPackageName": "clipboard",

"sourceBranch": "types-2.0",
"kind": "Mixed",
"globals": [
"Clipboard"
],
"kind": "DeclareModule",
"globals": [],
"declaredModules": [

@@ -26,3 +24,3 @@ "clipboard"

"hasPackageJson": false,
"contentHash": "db0f4f5bcb265c4fd6cd3ee2418adc169b6a2e14410b6787d59349a40ff235df"
"contentHash": "559fb8d0429c05529c5f08311db89388543bde49e9c16d539fe1ab51015cc401"
}
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