Skip to content

Commit 36b3937

Browse files
Merge pull request #6391 from Microsoft/lintShims
Lint 'shims.ts' and bump the tools version to 1.8
2 parents 14b3949 + 19efab7 commit 36b3937

File tree

2 files changed

+22
-10
lines changed

2 files changed

+22
-10
lines changed

Jakefile.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -912,10 +912,11 @@ function lintFileAsync(options, path, cb) {
912912
}
913913

914914
var servicesLintTargets = [
915-
"services.ts",
916-
"outliningElementsCollector.ts",
917915
"navigateTo.ts",
916+
"outliningElementsCollector.ts",
918917
"patternMatcher.ts",
918+
"services.ts",
919+
"shims.ts",
919920
].map(function (s) {
920921
return path.join(servicesDirectory, s);
921922
});

src/services/shims.ts

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,11 @@
1616
/// <reference path='services.ts' />
1717

1818
/* @internal */
19-
var debugObjectHost = (<any>this);
19+
let debugObjectHost = (<any>this);
20+
21+
// We need to use 'null' to interface with the managed side.
22+
/* tslint:disable:no-null */
23+
/* tslint:disable:no-in-operator */
2024

2125
/* @internal */
2226
namespace ts {
@@ -234,8 +238,6 @@ namespace ts {
234238
}
235239

236240
class ScriptSnapshotShimAdapter implements IScriptSnapshot {
237-
private lineStartPositions: number[] = null;
238-
239241
constructor(private scriptSnapshotShim: ScriptSnapshotShim) {
240242
}
241243

@@ -940,7 +942,7 @@ namespace ts {
940942
return {
941943
options: {},
942944
files: [],
943-
errors: [realizeDiagnostic(result.error, '\r\n')]
945+
errors: [realizeDiagnostic(result.error, "\r\n")]
944946
};
945947
}
946948

@@ -949,7 +951,7 @@ namespace ts {
949951
return {
950952
options: configFile.options,
951953
files: configFile.fileNames,
952-
errors: realizeDiagnostics(configFile.errors, '\r\n')
954+
errors: realizeDiagnostics(configFile.errors, "\r\n")
953955
};
954956
});
955957
}
@@ -1039,12 +1041,21 @@ namespace ts {
10391041
}
10401042
}
10411043

1044+
/* tslint:enable:no-in-operator */
1045+
/* tslint:enable:no-null */
1046+
10421047

10431048
/// TODO: this is used by VS, clean this up on both sides of the interface
10441049
/* @internal */
1045-
module TypeScript.Services {
1046-
export var TypeScriptServicesFactory = ts.TypeScriptServicesFactory;
1050+
namespace TypeScript.Services {
1051+
export const TypeScriptServicesFactory = ts.TypeScriptServicesFactory;
10471052
}
10481053

1054+
/* tslint:disable:no-unused-variable */
1055+
// 'toolsVersion' gets consumed by the managed side, so it's not unused.
1056+
// TODO: it should be moved into a namespace though.
1057+
10491058
/* @internal */
1050-
const toolsVersion = "1.6";
1059+
const toolsVersion = "1.8";
1060+
1061+
/* tslint:enable:no-unused-variable */

0 commit comments

Comments
 (0)