mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Minor fixes
This commit is contained in:
@@ -96,7 +96,7 @@ module Utils {
|
||||
path = "tests/" + path;
|
||||
}
|
||||
|
||||
let content = '';
|
||||
let content: string = undefined;
|
||||
try {
|
||||
content = ts.sys.readFile(Harness.userSpecifiedRoot + path);
|
||||
}
|
||||
@@ -812,12 +812,12 @@ module Harness {
|
||||
sourceText: string,
|
||||
languageVersion: ts.ScriptTarget) {
|
||||
// We'll only assert inletiants outside of light mode.
|
||||
const shouldassertInvariants = !Harness.lightMode;
|
||||
const shouldAssertInvariants = !Harness.lightMode;
|
||||
|
||||
// Only set the parent nodes if we're asserting inletiants. We don't need them otherwise.
|
||||
let result = ts.createSourceFile(fileName, sourceText, languageVersion, /*setParentNodes:*/ shouldassertInvariants);
|
||||
let result = ts.createSourceFile(fileName, sourceText, languageVersion, /*setParentNodes:*/ shouldAssertInvariants);
|
||||
|
||||
if (shouldassertInvariants) {
|
||||
if (shouldAssertInvariants) {
|
||||
Utils.assertInvariants(result, /*parent:*/ undefined);
|
||||
}
|
||||
|
||||
|
||||
@@ -329,8 +329,6 @@ module Harness.SourceMapRecoder {
|
||||
}
|
||||
|
||||
function writeRecordedSpans() {
|
||||
let markerIds: string[] = [];
|
||||
|
||||
function getMarkerId(markerIndex: number) {
|
||||
let markerId = "";
|
||||
if (spanMarkerContinues) {
|
||||
@@ -418,6 +416,7 @@ module Harness.SourceMapRecoder {
|
||||
writeJsFileLines(currentJsLine);
|
||||
|
||||
// Emit markers
|
||||
var markerIds: string[] = [];
|
||||
iterateSpans(writeSourceMapMarker);
|
||||
|
||||
let jsFileText = getTextOfLine(currentJsLine, jsLineMap, jsFile.code);
|
||||
|
||||
Reference in New Issue
Block a user