File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 1
- import * as Emitter from "component-emitter" ;
2
- import * as binary from "./binary" ;
1
+ import Emitter from "component-emitter" ;
2
+ import { deconstructPacket , reconstructPacket } from "./binary" ;
3
3
import isBinary from "./is-binary" ;
4
4
import debugModule from "debug" ;
5
5
@@ -23,7 +23,7 @@ export enum PacketType {
23
23
BINARY_ACK ,
24
24
}
25
25
26
- interface Packet {
26
+ export interface Packet {
27
27
type : PacketType ;
28
28
nsp : string ;
29
29
data ?: any ;
@@ -99,7 +99,7 @@ export class Encoder {
99
99
*/
100
100
101
101
private encodeAsBinary ( obj : Packet ) {
102
- const deconstruction = binary . deconstructPacket ( obj ) ;
102
+ const deconstruction = deconstructPacket ( obj ) ;
103
103
const pack = this . encodeAsString ( deconstruction . packet ) ;
104
104
const buffers = deconstruction . buffers ;
105
105
@@ -285,7 +285,7 @@ class BinaryReconstructor {
285
285
this . buffers . push ( binData ) ;
286
286
if ( this . buffers . length === this . reconPack . attachments ) {
287
287
// done with buffer list
288
- const packet = binary . reconstructPacket ( this . reconPack , this . buffers ) ;
288
+ const packet = reconstructPacket ( this . reconPack , this . buffers ) ;
289
289
this . finishedReconstruction ( ) ;
290
290
return packet ;
291
291
}
Original file line number Diff line number Diff line change 4
4
"allowJs" : false ,
5
5
"target" : " es2017" ,
6
6
"module" : " commonjs" ,
7
- "declaration" : true
7
+ "declaration" : true ,
8
+ "esModuleInterop" : true
8
9
},
9
10
"include" : [
10
11
" ./lib/**/*"
You can’t perform that action at this time.
0 commit comments