Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@types/msgpack

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/msgpack - npm Package Compare versions

Comparing version
0.0.32
to
0.0.33
+0
-5
msgpack/index.d.ts

@@ -1,6 +0,1 @@

// Type definitions for msgpack.js - MessagePack JavaScript Implementation
// Project: https://github.com/uupaa/msgpack.js/
// Definitions by: Shinya Mochizuki <https://github.com/enrapt-mochizuki/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace msgpack {

@@ -7,0 +2,0 @@ interface MsgPackStatic {

+5
-5
{
"name": "@types/msgpack",
"version": "0.0.32",
"description": "TypeScript definitions for msgpack.js - MessagePack JavaScript Implementation",
"version": "0.0.33",
"description": "TypeScript definitions for msgpack",
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/msgpack",

@@ -10,4 +10,4 @@ "license": "MIT",

"name": "Shinya Mochizuki",
"url": "https://github.com/enrapt-mochizuki",
"githubUsername": "enrapt-mochizuki"
"githubUsername": "enrapt-mochizuki",
"url": "https://github.com/enrapt-mochizuki"
}

@@ -24,4 +24,4 @@ ],

"dependencies": {},
"typesPublisherContentHash": "be99442e5b91d10e4084f5412dd7141282c09009e3b574c17839d2b869031cd3",
"typesPublisherContentHash": "ec970ee83ac17ae04c3e0fed04d991c70f92093820901d6e36803963a8932efb",
"typeScriptVersion": "4.5"
}

@@ -5,13 +5,101 @@ # Installation

# Summary
This package contains type definitions for msgpack.js - MessagePack JavaScript Implementation (https://github.com/uupaa/msgpack.js/).
This package contains type definitions for msgpack (https://github.com/uupaa/msgpack.js/).
# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/msgpack.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/msgpack/index.d.ts)
````ts
declare namespace msgpack {
interface MsgPackStatic {
/**
* @param data string or ByteArray.
* @param toString return string value if true.
*
* @return string or ByteArray or false. pack failed if false.
*/
pack(data: any, toString?: boolean): any;
/**
* @param data string or ByteArray.
*
* @return string or ByteArray or undefined. unpack failed if undefined.
*/
unpack(data: any): any;
worker: string;
upload(url: string, option: MsgPackUploadOption, callback: MsgPackUploadCallback): void;
download(url: string, option: MsgPackDownloadOption, callback: MsgPackDownloadCallback): void;
}
interface MsgPackUploadOption {
/**
* string or ByteArray
*/
data: any;
/**
* use WebWorker if true.
*/
worker?: boolean | undefined;
/**
* timeout sec.
*/
timeout?: number | undefined;
before?: ((xhr: XMLHttpRequest, option: MsgPackUploadOption) => void) | undefined;
after?: ((xhr: XMLHttpRequest, option: MsgPackUploadOption, result: MsgPackCallbackResult) => void) | undefined;
}
interface MsgPackUploadCallback {
(data: string, option: MsgPackUploadOption, result: MsgPackCallbackResult): void;
}
interface MsgPackDownloadOption {
/**
* use WebWorker if true.
*/
worker?: boolean | undefined;
/**
* timeout sec.
*/
timeout?: number | undefined;
before?: ((xhr: XMLHttpRequest, option: MsgPackDownloadOption) => void) | undefined;
after?:
| ((xhr: XMLHttpRequest, option: MsgPackDownloadOption, result: MsgPackCallbackResult) => void)
| undefined;
}
interface MsgPackDownloadCallback {
/**
* @param data string or ByteArray
*/
(data: any, option: MsgPackDownloadOption, result: MsgPackCallbackResult): void;
}
interface MsgPackCallbackResult {
status: number;
ok: boolean;
}
}
declare var msgpack: msgpack.MsgPackStatic;
export = msgpack;
export as namespace msgpack;
````
### Additional Details
* Last updated: Wed, 27 Sep 2023 09:42:16 GMT
* Last updated: Wed, 18 Oct 2023 05:47:08 GMT
* Dependencies: none
* Global values: `msgpack`
# Credits
These definitions were written by [Shinya Mochizuki](https://github.com/enrapt-mochizuki).