@@ -7831,7 +7831,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
7831
7831
if (context.tracker.canTrackSymbol && isComputedPropertyName(node) && isLateBindableName(node)) {
7832
7832
trackComputedName(node.expression, context.enclosingDeclaration, context);
7833
7833
}
7834
- let visited = visitEachChild(node, elideInitializerAndSetEmitFlags, /*context*/ undefined, /*nodesVisitor*/ undefined, elideInitializerAndSetEmitFlags)! ;
7834
+ let visited = visitEachChild(node, elideInitializerAndSetEmitFlags, /*context*/ undefined, /*nodesVisitor*/ undefined, elideInitializerAndSetEmitFlags);
7835
7835
if (isBindingElement(visited)) {
7836
7836
visited = factory.updateBindingElement(
7837
7837
visited,
@@ -32643,7 +32643,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
32643
32643
// Find the first enclosing class that has the declaring classes of the protected constituents
32644
32644
// of the property as base classes
32645
32645
let enclosingClass = forEachEnclosingClass(location, enclosingDeclaration => {
32646
- const enclosingClass = getDeclaredTypeOfSymbol(getSymbolOfDeclaration(enclosingDeclaration)! ) as InterfaceType;
32646
+ const enclosingClass = getDeclaredTypeOfSymbol(getSymbolOfDeclaration(enclosingDeclaration)) as InterfaceType;
32647
32647
return isClassDerivedFromDeclaringClasses(enclosingClass, prop, writing);
32648
32648
});
32649
32649
// A protected property is accessible if the property is within the declaring class or classes derived from it
@@ -36292,7 +36292,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
36292
36292
return getTypeOfSymbol(symbol);
36293
36293
}
36294
36294
else {
36295
- const symbol = getSymbolOfDeclaration(container)! ;
36295
+ const symbol = getSymbolOfDeclaration(container);
36296
36296
return getTypeOfSymbol(symbol);
36297
36297
}
36298
36298
}
@@ -40082,7 +40082,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
40082
40082
// TypeScript 1.0 spec (April 2014)
40083
40083
// 3.7.4: An object type can contain at most one string index signature and one numeric index signature.
40084
40084
// 8.5: A class declaration can have at most one string index member declaration and one numeric index member declaration
40085
- const indexSymbol = getIndexSymbol(getSymbolOfDeclaration(node)! );
40085
+ const indexSymbol = getIndexSymbol(getSymbolOfDeclaration(node));
40086
40086
if (indexSymbol?.declarations) {
40087
40087
const indexSignatureMap = new Map<TypeId, { type: Type; declarations: IndexSignatureDeclaration[]; }>();
40088
40088
for (const declaration of (indexSymbol.declarations as IndexSignatureDeclaration[])) {
@@ -41039,7 +41039,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
41039
41039
case SyntaxKind.NamespaceImport:
41040
41040
case SyntaxKind.ImportClause:
41041
41041
let result = DeclarationSpaces.None;
41042
- const target = resolveAlias(getSymbolOfDeclaration(d as ImportEqualsDeclaration | NamespaceImport | ImportClause | ExportAssignment | BinaryExpression)! );
41042
+ const target = resolveAlias(getSymbolOfDeclaration(d as ImportEqualsDeclaration | NamespaceImport | ImportClause | ExportAssignment | BinaryExpression));
41043
41043
forEach(target.declarations, d => {
41044
41044
result |= getDeclarationSpaces(d);
41045
41045
});
@@ -47553,7 +47553,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
47553
47553
47554
47554
if (isDeclarationNameOrImportPropertyName(node)) {
47555
47555
// This is a declaration, call getSymbolOfNode
47556
- const parentSymbol = getSymbolOfDeclaration(parent as Declaration)! ;
47556
+ const parentSymbol = getSymbolOfDeclaration(parent as Declaration);
47557
47557
return isImportOrExportSpecifier(node.parent) && node.parent.propertyName === node
47558
47558
? getImmediateAliasedSymbol(parentSymbol)
47559
47559
: parentSymbol;
0 commit comments