packages/babel-plugin-transform-classes/test/fixtures/regression/2663/input.mjs
raw| 1 | import net from 'net'; |
| 2 | import { EventEmitter } from 'events'; |
| 3 | import BinarySerializer from './helpers/binary-serializer'; |
| 4 | // import ... |
| 5 | |
| 6 | export default class Connection extends EventEmitter { |
| 7 | constructor(endpoint, joinKey, joinData, roomId) { |
| 8 | super(); |
| 9 | |
| 10 | this.isConnected = false; |
| 11 | this.roomId = roomId; |
| 12 | |
| 13 | // ... |
| 14 | } |
| 15 | |
| 16 | send(message) { |
| 17 | this.sock.write(BinarySerializer.serializeMessage(message)); |
| 18 | } |
| 19 | |
| 20 | disconnect() { |
| 21 | this.sock.close(); |
| 22 | } |
| 23 | } |