Skip to content

Commit 58f4c6f

Browse files
authored
Merge pull request microsoft#24457 from Microsoft/fixBuild
Fix build
2 parents cc46ea1 + 94c4557 commit 58f4c6f

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

scripts/tslint/rules/nextLineRule.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ function walk(ctx: Lint.WalkContext<void>, checkCatch: boolean, checkElse: boole
5252
return;
5353
}
5454

55-
const tryClosingBrace = tryBlock.getLastToken(sourceFile);
56-
const catchKeyword = catchClause.getFirstToken(sourceFile);
55+
const tryClosingBrace = tryBlock.getLastToken(sourceFile)!;
56+
const catchKeyword = catchClause.getFirstToken(sourceFile)!;
5757
const tryClosingBraceLoc = sourceFile.getLineAndCharacterOfPosition(tryClosingBrace.getEnd());
5858
const catchKeywordLoc = sourceFile.getLineAndCharacterOfPosition(catchKeyword.getStart(sourceFile));
5959
if (tryClosingBraceLoc.line === catchKeywordLoc.line) {

scripts/tslint/rules/noInOperatorRule.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export class Rule extends Lint.Rules.AbstractRule {
1212
function walk(ctx: Lint.WalkContext<void>): void {
1313
ts.forEachChild(ctx.sourceFile, recur);
1414
function recur(node: ts.Node): void {
15-
if (node.kind === ts.SyntaxKind.InKeyword && node.parent!.kind === ts.SyntaxKind.BinaryExpression) {
15+
if (node.kind === ts.SyntaxKind.InKeyword && node.parent.kind === ts.SyntaxKind.BinaryExpression) {
1616
ctx.addFailureAtNode(node, Rule.FAILURE_STRING);
1717
}
1818
}

scripts/tslint/rules/noIncrementDecrementRule.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function walk(ctx: Lint.WalkContext<void>): void {
2828
}
2929

3030
function check(node: ts.UnaryExpression): void {
31-
if (!isAllowedLocation(node.parent!)) {
31+
if (!isAllowedLocation(node.parent)) {
3232
ctx.addFailureAtNode(node, Rule.POSTFIX_FAILURE_STRING);
3333
}
3434
}
@@ -47,7 +47,7 @@ function isAllowedLocation(node: ts.Node): boolean {
4747
// Can be in a comma operator in a for statement (`for (let a = 0, b = 10; a < b; a++, b--)`)
4848
case ts.SyntaxKind.BinaryExpression:
4949
return (node as ts.BinaryExpression).operatorToken.kind === ts.SyntaxKind.CommaToken &&
50-
node.parent!.kind === ts.SyntaxKind.ForStatement;
50+
node.parent.kind === ts.SyntaxKind.ForStatement;
5151

5252
default:
5353
return false;

src/services/documentHighlights.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ namespace ts.DocumentHighlights {
180180
default:
181181
// Don't cross function boundaries.
182182
// TODO: GH#20090
183-
return (isFunctionLike(node) && "quit") as false | "quit";
183+
return isFunctionLike(node) && "quit";
184184
}
185185
});
186186
}

0 commit comments

Comments
 (0)