Skip to content

Commit 93a459b

Browse files
Merge pull request microsoft#6164 from Microsoft/fileList
'filelist' -> 'fileList' and use 'const' for import
2 parents 66a0f1d + 9badf0c commit 93a459b

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed

src/server/editorServices.ts

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ namespace ts.server {
486486
// number becomes 0 for a watcher, then we should close it.
487487
directoryWatchersRefCount: ts.Map<number> = {};
488488
hostConfiguration: HostConfiguration;
489-
timerForDetectingProjectFilelistChanges: Map<NodeJS.Timer> = {};
489+
timerForDetectingProjectFileListChanges: Map<NodeJS.Timer> = {};
490490

491491
constructor(public host: ServerHost, public psLogger: Logger, public eventHandler?: ProjectServiceEventHandler) {
492492
// ts.disableIncrementalParsing = true;
@@ -541,21 +541,20 @@ namespace ts.server {
541541
}
542542

543543
this.log("Detected source file changes: " + fileName);
544-
this.startTimerForDetectingProjectFilelistChanges(project);
544+
this.startTimerForDetectingProjectFileListChanges(project);
545545
}
546546

547-
startTimerForDetectingProjectFilelistChanges(project: Project) {
548-
if (this.timerForDetectingProjectFilelistChanges[project.projectFilename]) {
549-
clearTimeout(this.timerForDetectingProjectFilelistChanges[project.projectFilename]);
547+
startTimerForDetectingProjectFileListChanges(project: Project) {
548+
if (this.timerForDetectingProjectFileListChanges[project.projectFilename]) {
549+
clearTimeout(this.timerForDetectingProjectFileListChanges[project.projectFilename]);
550550
}
551-
this.timerForDetectingProjectFilelistChanges[project.projectFilename] = setTimeout(
552-
() => this.handleProjectFilelistChanges(project),
551+
this.timerForDetectingProjectFileListChanges[project.projectFilename] = setTimeout(
552+
() => this.handleProjectFileListChanges(project),
553553
250
554554
);
555555
}
556556

557-
handleProjectFilelistChanges(project: Project) {
558-
// TODO: Ignoring potentially returned 'error' and 'succeeded' condition
557+
handleProjectFileListChanges(project: Project) {
559558
const { projectOptions } = this.configFileToProjectOptions(project.projectFilename);
560559

561560
const newRootFiles = projectOptions.files.map((f => this.getCanonicalFileName(f)));
@@ -585,7 +584,6 @@ namespace ts.server {
585584

586585
this.log("Detected newly added tsconfig file: " + fileName);
587586

588-
// TODO: Ignoring potentially returned 'error' and 'succeeded' condition
589587
const { projectOptions } = this.configFileToProjectOptions(fileName);
590588

591589
const rootFilesInTsconfig = projectOptions.files.map(f => this.getCanonicalFileName(f));
@@ -1085,7 +1083,6 @@ namespace ts.server {
10851083
* Close file whose contents is managed by the client
10861084
* @param filename is absolute pathname
10871085
*/
1088-
10891086
closeClientFile(filename: string) {
10901087
const info = ts.lookUp(this.filenameToScriptInfo, filename);
10911088
if (info) {
@@ -1741,9 +1738,9 @@ namespace ts.server {
17411738
}
17421739

17431740
getLineMapper() {
1744-
return ((line: number) => {
1741+
return (line: number) => {
17451742
return this.index.lineNumberToInfo(line).offset;
1746-
});
1743+
};
17471744
}
17481745

17491746
getTextChangeRangeSinceVersion(scriptVersion: number) {

tests/cases/unittests/session.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/// <reference path="..\..\..\src\harness\harness.ts" />
22

3-
var expect: typeof _chai.expect = _chai.expect;
3+
const expect: typeof _chai.expect = _chai.expect;
44

55
namespace ts.server {
66
let lastWrittenToHost: string;

0 commit comments

Comments
 (0)