|
1 | 1 | /// <reference path="..\..\..\src\harness\harness.ts" /> |
2 | 2 |
|
3 | | -module ts.server { |
| 3 | +namespace ts.server { |
4 | 4 | let lastWrittenToHost: string; |
5 | 5 | const mockHost: ServerHost = { |
6 | 6 | args: [], |
@@ -256,8 +256,8 @@ module ts.server { |
256 | 256 | describe("how Session is extendable via subclassing", () => { |
257 | 257 | class TestSession extends Session { |
258 | 258 | lastSent: protocol.Message; |
259 | | - customHandler: string = "testhandler"; |
260 | | - constructor(){ |
| 259 | + customHandler = "testhandler"; |
| 260 | + constructor() { |
261 | 261 | super(mockHost, Buffer.byteLength, process.hrtime, mockLogger); |
262 | 262 | this.addProtocolHandler(this.customHandler, () => { |
263 | 263 | return {response: undefined, responseRequired: true}; |
@@ -315,7 +315,7 @@ module ts.server { |
315 | 315 | describe("an example of using the Session API to create an in-process server", () => { |
316 | 316 | class InProcSession extends Session { |
317 | 317 | private queue: protocol.Request[] = []; |
318 | | - constructor(private client: {handle: (msg: protocol.Message) => void}) { |
| 318 | + constructor(private client: InProcClient) { |
319 | 319 | super(mockHost, Buffer.byteLength, process.hrtime, mockLogger); |
320 | 320 | this.addProtocolHandler("echo", (req: protocol.Request) => ({ |
321 | 321 | response: req.arguments, |
@@ -355,7 +355,7 @@ module ts.server { |
355 | 355 |
|
356 | 356 | class InProcClient { |
357 | 357 | private server: InProcSession; |
358 | | - private seq: number = 0; |
| 358 | + private seq = 0; |
359 | 359 | private callbacks: ts.Map<(resp: protocol.Response) => void> = {}; |
360 | 360 | private eventHandlers: ts.Map<(args: any) => void> = {}; |
361 | 361 |
|
|
0 commit comments