Archived
1
0

Remove block padding (blank lines)

Also made a rule for it.
This commit is contained in:
Asher
2019-02-05 18:08:48 -06:00
parent dc08df5540
commit e770920be0
43 changed files with 108 additions and 189 deletions

View File

@ -9,7 +9,6 @@ import { EventEmitter } from "events";
* Client accepts an arbitrary connection intended to communicate with the Server.
*/
export class Client {
public Socket: typeof ServerSocket;
private evalId: number = 0;
@ -453,5 +452,4 @@ export class Client {
}
this.connections.set(id, socket);
}
}

View File

@ -170,7 +170,6 @@ export interface Socket {
}
export class ServerSocket extends events.EventEmitter implements Socket {
public writable: boolean = true;
public readable: boolean = true;
@ -276,7 +275,6 @@ export class ServerSocket extends events.EventEmitter implements Socket {
public setDefaultEncoding(encoding: string): this {
throw new Error("Method not implemented.");
}
}
export interface Server {
@ -307,7 +305,6 @@ export interface Server {
}
export class ServerListener extends events.EventEmitter implements Server {
private _listening: boolean = false;
public constructor(
@ -358,7 +355,6 @@ export class ServerListener extends events.EventEmitter implements Server {
return this;
}
}
export interface ActiveEval {

View File

@ -3,7 +3,6 @@ import { Client } from "../client";
import { useBuffer } from "../../common/util";
export class CP {
public constructor(
private readonly client: Client,
) { }
@ -75,5 +74,4 @@ export class CP {
Array.isArray(args) || !args ? options : args,
);
}
}

View File

@ -19,7 +19,6 @@ declare var _Buffer: typeof Buffer;
* _this somehow which the __awaiter helper uses.
*/
export class FS {
public constructor(
private readonly client: Client,
) { }
@ -686,11 +685,9 @@ export class FS {
return watcher;
}
}
class Watcher extends EventEmitter implements fs.FSWatcher {
public constructor(private readonly process: ChildProcess) {
super();
}
@ -698,7 +695,6 @@ class Watcher extends EventEmitter implements fs.FSWatcher {
public close(): void {
this.process.kill();
}
}
interface IStats {
@ -730,7 +726,6 @@ interface IStats {
}
class Stats implements fs.Stats {
public readonly atime: Date;
public readonly mtime: Date;
public readonly ctime: Date;
@ -768,7 +763,6 @@ class Stats implements fs.Stats {
public toObject(): object {
return JSON.parse(JSON.stringify(this));
}
}
/**
@ -776,7 +770,6 @@ class Stats implements fs.Stats {
* Assumes that messages are split by newlines.
*/
export class NewlineInputBuffer {
private callback: (msg: string) => void;
private buffer: string | undefined;
@ -804,5 +797,4 @@ export class NewlineInputBuffer {
this.callback(lines[i]);
}
}
}

View File

@ -7,7 +7,6 @@ type NodeNet = typeof net;
* Implementation of net for the browser.
*/
export class Net implements NodeNet {
public constructor(
private readonly client: Client,
) {}
@ -51,5 +50,4 @@ export class Net implements NodeNet {
): net.Server {
return this.client.createServer() as net.Server;
}
}

View File

@ -1,5 +1,5 @@
import * as vm from "vm";
import { NewEvalMessage, TypedValue, EvalFailedMessage, EvalDoneMessage, ServerMessage, EvalEventMessage, ClientMessage } from "../proto";
import { NewEvalMessage, TypedValue, EvalFailedMessage, EvalDoneMessage, ServerMessage, EvalEventMessage } from "../proto";
import { SendableConnection } from "../common/connection";
import { EventEmitter } from "events";

View File

@ -20,7 +20,6 @@ export interface ServerOptions {
}
export class Server {
private readonly sessions: Map<number, Process> = new Map();
private readonly connections: Map<number, net.Socket> = new Map();
private readonly servers: Map<number, net.Server> = new Map();
@ -250,5 +249,4 @@ export class Server {
private getSession(id: number): Process | undefined {
return this.sessions.get(id);
}
}