@types/socket.io-parser
Advanced tools
Comparing version 0.0.2 to 2.2.0
@@ -1,39 +0,33 @@ | ||
// Type definitions for json-editor | ||
// Type definitions for socket.io-parser 2.2 | ||
// Project: https://github.com/socketio/socket.io-parser | ||
// Definitions by: York Yao <https://github.com/plantain-00/> | ||
// Definitions by: York Yao <https://github.com/plantain-00> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
///<reference types="node" /> | ||
/// <reference types="node" /> | ||
declare module "socket.io-parser" { | ||
namespace Parser { | ||
type Packet = { | ||
type: number, | ||
data: any, | ||
id: number | ||
} | ||
type EncodedPacket = string | Buffer | ArrayBuffer | Blob; | ||
export interface Packet { | ||
type: number; | ||
data: any; | ||
id: number; | ||
} | ||
export type EncodedPacket = string | Buffer | ArrayBuffer | Blob; | ||
var types: string[]; | ||
export const types: string[]; | ||
var CONNECT: number; | ||
var DISCONNECT: number; | ||
var EVENT: number; | ||
var ACK: number; | ||
var ERROR: number; | ||
var BINARY_EVENT: number; | ||
var BINARY_ACK: number; | ||
export const CONNECT: number; | ||
export const DISCONNECT: number; | ||
export const EVENT: number; | ||
export const ACK: number; | ||
export const ERROR: number; | ||
export const BINARY_EVENT: number; | ||
export const BINARY_ACK: number; | ||
class Encoder { | ||
encode(packet: Packet, callback: (encodedPackets: EncodedPacket[]) => void): void; | ||
} | ||
export class Encoder { | ||
encode(packet: Packet, callback: (encodedPackets: EncodedPacket[]) => void): void; | ||
} | ||
class Decoder { | ||
on(event: string, callback: (decodedPacket: Packet) => void): void; | ||
add(encodedPacket: EncodedPacket): void; | ||
destroy(): void; | ||
} | ||
} | ||
export = Parser; | ||
export class Decoder { | ||
on(event: string, callback: (decodedPacket: Packet) => void): void; | ||
add(encodedPacket: EncodedPacket): void; | ||
destroy(): void; | ||
} |
{ | ||
"name": "@types/socket.io-parser", | ||
"version": "0.0.2", | ||
"description": "TypeScript definitions for json-editor", | ||
"version": "2.2.0", | ||
"description": "TypeScript definitions for socket.io-parser", | ||
"license": "MIT", | ||
"author": "York Yao <https://github.com/plantain-00/>", | ||
"contributors": [ | ||
{ | ||
"name": "York Yao", | ||
"url": "https://github.com/plantain-00", | ||
"githubUsername": "plantain-00" | ||
} | ||
], | ||
"main": "", | ||
@@ -16,5 +22,4 @@ "repository": { | ||
}, | ||
"peerDependencies": {}, | ||
"typings": "index.d.ts", | ||
"typesPublisherContentHash": "de87aaa30f24026ae9d7bfa04c4228efcbbc1e7990ae1a557d655a0ba58d4a03" | ||
"typesPublisherContentHash": "e97a1e6c386024ec3131b6d5bae8b6becc8ff26cad735048fc2e20a77f248a95", | ||
"typeScriptVersion": "2.0" | ||
} |
@@ -5,15 +5,13 @@ # Installation | ||
# Summary | ||
This package contains type definitions for json-editor (https://github.com/socketio/socket.io-parser). | ||
This package contains type definitions for socket.io-parser (https://github.com/socketio/socket.io-parser). | ||
# Details | ||
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/types-2.0/socket.io-parser | ||
Files were exported from https://www.github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/socket.io-parser | ||
Additional Details | ||
* Last updated: Mon, 21 Nov 2016 21:03:00 GMT | ||
* File structure: DeclareModule | ||
* Library Dependencies: node | ||
* Module Dependencies: none | ||
* Last updated: Thu, 28 Dec 2017 00:36:00 GMT | ||
* Dependencies: node | ||
* Global values: none | ||
# Credits | ||
These definitions were written by York Yao <https://github.com/plantain-00/>. | ||
These definitions were written by York Yao <https://github.com/plantain-00>. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
3294
1
27
17