Skip to content

Commit 9c09820

Browse files
committed
lint node.d.ts
1 parent 5ce7fd9 commit 9c09820

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

Jakefile.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ var servicesSources = [
9696
return path.join(servicesDirectory, f);
9797
}));
9898

99-
var serverOnlySources = [
99+
var serverCoreSources = [
100100
"node.d.ts",
101101
"editorServices.ts",
102102
"protocol.d.ts",
@@ -106,7 +106,7 @@ var serverOnlySources = [
106106
return path.join(serverDirectory, f);
107107
});
108108

109-
var serverSources = serverOnlySources.concat(servicesSources);
109+
var serverSources = serverCoreSources.concat(servicesSources);
110110

111111
var languageServiceLibrarySources = [
112112
"editorServices.ts",
@@ -902,7 +902,7 @@ function lintFileAsync(options, path, cb) {
902902

903903
var lintTargets = compilerSources
904904
.concat(harnessCoreSources)
905-
.concat(serverOnlySources.filter(function(p) { return path.basename(p) !== "node.d.ts"; }));
905+
.concat(serverCoreSources);
906906

907907
desc("Runs tslint on the compiler sources");
908908
task("lint", ["build-rules"], function() {

src/server/node.d.ts

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ declare var SlowBuffer: {
6262
// Buffer class
6363
interface Buffer extends NodeBuffer { }
6464
interface BufferConstructor {
65-
new (str: string, encoding ?: string): Buffer;
65+
new (str: string, encoding?: string): Buffer;
6666
new (size: number): Buffer;
6767
new (size: Uint8Array): Buffer;
6868
new (array: any[]): Buffer;
6969
prototype: Buffer;
7070
isBuffer(obj: any): boolean;
71-
byteLength(string: string, encoding ?: string): number;
72-
concat(list: Buffer[], totalLength ?: number): Buffer;
71+
byteLength(string: string, encoding?: string): number;
72+
concat(list: Buffer[], totalLength?: number): Buffer;
7373
}
7474
declare var Buffer: BufferConstructor;
7575

@@ -78,7 +78,7 @@ declare var Buffer: BufferConstructor;
7878
* GLOBAL INTERFACES *
7979
* *
8080
************************************************/
81-
declare module NodeJS {
81+
declare namespace NodeJS {
8282
export interface ErrnoException extends Error {
8383
errno?: any;
8484
code?: string;
@@ -245,7 +245,7 @@ interface NodeBuffer {
245245
fill(value: any, offset?: number, end?: number): void;
246246
}
247247

248-
declare module NodeJS {
248+
declare namespace NodeJS {
249249
export interface Path {
250250
normalize(p: string): string;
251251
join(...paths: any[]): string;
@@ -258,7 +258,7 @@ declare module NodeJS {
258258
}
259259
}
260260

261-
declare module NodeJS {
261+
declare namespace NodeJS {
262262
export interface ReadLineInstance extends EventEmitter {
263263
setPrompt(prompt: string, length: number): void;
264264
prompt(preserveCursor?: boolean): void;
@@ -280,8 +280,8 @@ declare module NodeJS {
280280
}
281281
}
282282

283-
declare module NodeJS {
284-
module events {
283+
declare namespace NodeJS {
284+
namespace events {
285285
export class EventEmitter implements NodeJS.EventEmitter {
286286
static listenerCount(emitter: EventEmitter, event: string): number;
287287

@@ -297,8 +297,8 @@ declare module NodeJS {
297297
}
298298
}
299299

300-
declare module NodeJS {
301-
module stream {
300+
declare namespace NodeJS {
301+
namespace stream {
302302

303303
export interface Stream extends events.EventEmitter {
304304
pipe<T extends NodeJS.WritableStream>(destination: T, options?: { end?: boolean; }): T;
@@ -397,8 +397,8 @@ declare module NodeJS {
397397
}
398398
}
399399

400-
declare module NodeJS {
401-
module fs {
400+
declare namespace NodeJS {
401+
namespace fs {
402402
interface Stats {
403403
isFile(): boolean;
404404
isDirectory(): boolean;
@@ -547,8 +547,8 @@ declare module NodeJS {
547547
}
548548
}
549549

550-
declare module NodeJS {
551-
module path {
550+
declare namespace NodeJS {
551+
namespace path {
552552
export function normalize(p: string): string;
553553
export function join(...paths: any[]): string;
554554
export function resolve(...pathSegments: any[]): string;
@@ -560,8 +560,8 @@ declare module NodeJS {
560560
}
561561
}
562562

563-
declare module NodeJS {
564-
module _debugger {
563+
declare namespace NodeJS {
564+
namespace _debugger {
565565
export interface Packet {
566566
raw: string;
567567
headers: string[];

0 commit comments

Comments
 (0)