mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Fix up linting errors
This commit is contained in:
@@ -506,7 +506,7 @@ namespace ts {
|
||||
container = saveContainer;
|
||||
blockScopeContainer = savedBlockScopeContainer;
|
||||
}
|
||||
|
||||
|
||||
function bindChildren(node: Node): void {
|
||||
if (skipTransformFlagAggregation) {
|
||||
bindChildrenWorker(node);
|
||||
|
||||
@@ -627,7 +627,7 @@ namespace ts {
|
||||
// ... = class ${name} ${heritageClauses} {
|
||||
// ${members}
|
||||
// }
|
||||
let classExpression: Expression = setOriginalNode(
|
||||
const classExpression: Expression = setOriginalNode(
|
||||
createClassExpression(
|
||||
name,
|
||||
visitNodes(node.heritageClauses, visitor, isHeritageClause),
|
||||
|
||||
@@ -769,7 +769,7 @@ namespace Harness {
|
||||
return response.responseText;
|
||||
}
|
||||
else {
|
||||
return null;
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -472,7 +472,7 @@ class ProjectRunner extends RunnerBase {
|
||||
|
||||
it("Baseline of emitted result (" + moduleNameToString(moduleKind) + "): " + testCaseFileName, () => {
|
||||
if (testCase.baselineCheck) {
|
||||
var lastError: any = undefined;
|
||||
let lastError: any = undefined;
|
||||
ts.forEach(compilerResult.outputFiles, outputFile => {
|
||||
try {
|
||||
Harness.Baseline.runBaseline("Baseline of emitted result (" + moduleNameToString(compilerResult.moduleKind) + "): " + testCaseFileName, getBaselineFolder(compilerResult.moduleKind) + outputFile.fileName, () => {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/// <reference path="..\..\..\src\compiler\parser.ts" />
|
||||
/// <reference path="..\..\..\src\harness\harness.ts" />
|
||||
|
||||
module ts {
|
||||
namespace ts {
|
||||
describe("JSDocParsing", () => {
|
||||
describe("TypeExpressions", () => {
|
||||
function parsesCorrectly(name: string, content: string) {
|
||||
@@ -95,10 +95,10 @@ module ts {
|
||||
it(name, () => {
|
||||
const comment = parseIsolatedJSDocComment(content);
|
||||
if (!comment) {
|
||||
Debug.fail('Comment failed to parse entirely');
|
||||
Debug.fail("Comment failed to parse entirely");
|
||||
}
|
||||
if (comment.diagnostics.length > 0) {
|
||||
Debug.fail('Comment has at least one diagnostic: ' + comment.diagnostics[0].messageText);
|
||||
Debug.fail("Comment has at least one diagnostic: " + comment.diagnostics[0].messageText);
|
||||
}
|
||||
|
||||
Harness.Baseline.runBaseline("parseCorrectly", "JSDocParsing/DocComments.parsesCorrectly." + name + ".json",
|
||||
@@ -118,29 +118,29 @@ module ts {
|
||||
parsesIncorrectly("emptyComment", "/***/");
|
||||
parsesIncorrectly("threeAsterisks", "/*** */");
|
||||
parsesIncorrectly("asteriskAfterPreamble", "/** * @type {number} */");
|
||||
parsesIncorrectly("multipleTypes",
|
||||
parsesIncorrectly("multipleTypes",
|
||||
`/**
|
||||
* @type {number}
|
||||
* @type {string}
|
||||
*/`);
|
||||
parsesIncorrectly("multipleReturnTypes",
|
||||
parsesIncorrectly("multipleReturnTypes",
|
||||
`/**
|
||||
* @return {number}
|
||||
* @return {string}
|
||||
*/`);
|
||||
parsesIncorrectly("noTypeParameters",
|
||||
parsesIncorrectly("noTypeParameters",
|
||||
`/**
|
||||
* @template
|
||||
*/`);
|
||||
parsesIncorrectly("trailingTypeParameterComma",
|
||||
parsesIncorrectly("trailingTypeParameterComma",
|
||||
`/**
|
||||
* @template T,
|
||||
*/`);
|
||||
parsesIncorrectly("paramWithoutName",
|
||||
parsesIncorrectly("paramWithoutName",
|
||||
`/**
|
||||
* @param {number}
|
||||
*/`);
|
||||
parsesIncorrectly("paramWithoutTypeOrName",
|
||||
parsesIncorrectly("paramWithoutTypeOrName",
|
||||
`/**
|
||||
* @param
|
||||
*/`);
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace ts {
|
||||
it("Correct errors for " + justName, () => {
|
||||
Harness.Baseline.runBaseline("Correct errors", justName.replace(/\.tsx?$/, ".errors.txt"), () => {
|
||||
if (transpileResult.diagnostics.length === 0) {
|
||||
return null;
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return Harness.Compiler.getErrorBaseline(toBeCompiled, transpileResult.diagnostics);
|
||||
@@ -75,7 +75,7 @@ namespace ts {
|
||||
it("Correct errors (old transpile) for " + justName, () => {
|
||||
Harness.Baseline.runBaseline("Correct errors", justName.replace(/\.tsx?$/, ".oldTranspile.errors.txt"), () => {
|
||||
if (oldTranspileDiagnostics.length === 0) {
|
||||
return null;
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return Harness.Compiler.getErrorBaseline(toBeCompiled, oldTranspileDiagnostics);
|
||||
|
||||
Reference in New Issue
Block a user