
Security News
AI Has Taken Over Open Source
Vibe coding at scale is reshaping how packages are created, contributed, and selected across the software supply chain
@types/msgpack
Advanced tools
TypeScript definitions for msgpack
npm install --save @types/msgpack
This package contains type definitions for msgpack (https://github.com/uupaa/msgpack.js/).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/msgpack.
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;
These definitions were written by Shinya Mochizuki.
FAQs
TypeScript definitions for msgpack
The npm package @types/msgpack receives a total of 3,696 weekly downloads. As such, @types/msgpack popularity was classified as popular.
We found that @types/msgpack demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Vibe coding at scale is reshaping how packages are created, contributed, and selected across the software supply chain

Security News
npm invalidated all granular access tokens that bypass 2FA after a fresh Mini Shai-Hulud wave compromised 323 npm packages. Staged publishing also entered public preview.

Research
/Security News
Compromised npm package art-template delivered a Coruna-like iOS Safari exploit framework through a watering-hole attack.