+14
-2
| // msg-ext | ||
| /// <reference types="node" /> | ||
| import {Msg, MsgInterface} from "msg-interface"; | ||
| import {MsgInterface} from "msg-interface"; | ||
| export declare class MsgExt extends Msg implements MsgInterface { | ||
| export declare class MsgExt implements MsgInterface { | ||
| constructor(payload: Buffer, type?: number); | ||
@@ -18,2 +19,13 @@ constructor(type: number, payload: Buffer); | ||
| type: number; | ||
| /** | ||
| * expected maximum length of msgpack representation in bytes | ||
| */ | ||
| msgpackLength: number; | ||
| /** | ||
| * write the msgpack representation to the buffer with an optional offset address | ||
| * @return {number} actual length of msgpack representation written | ||
| */ | ||
| writeMsgpackTo(buffer: Buffer, offset: number): number; | ||
| } |
+1
-7
| "use strict"; | ||
| var Msg = require("msg-interface").Msg; | ||
| exports.MsgExt = MsgExt; | ||
@@ -16,4 +14,2 @@ | ||
| Msg.call(this); | ||
| if (!isNaN(payload) && Buffer.isBuffer(type)) { | ||
@@ -46,4 +42,2 @@ return MsgExt.call(this, type, +payload); | ||
| (function(P) { | ||
| MsgExt.prototype = P; | ||
| P.type = void 0; | ||
@@ -55,3 +49,3 @@ | ||
| })(Object.create(Msg.prototype)); | ||
| })(MsgExt.prototype); | ||
@@ -58,0 +52,0 @@ var fixedToken = []; |
+3
-2
| { | ||
| "name": "msg-ext", | ||
| "description": "msgpack ext type container", | ||
| "version": "1.0.0", | ||
| "version": "1.0.1", | ||
| "author": "@kawanet", | ||
@@ -10,5 +10,6 @@ "bugs": { | ||
| "dependencies": { | ||
| "msg-interface": "^1.0.0" | ||
| "msg-interface": "^1.1.0" | ||
| }, | ||
| "devDependencies": { | ||
| "@types/node": "^10.12.0", | ||
| "coveralls": "^3.0.2", | ||
@@ -15,0 +16,0 @@ "jshint": "^2.9.6", |
Sorry, the diff of this file is not supported yet
14917
1.51%278
2.58%6
20%12
-7.69%Updated