@@ -5479,7 +5479,7 @@ namespace ts {
5479
5479
let targetType = getIndexTypeOfType(target, IndexKind.String);
5480
5480
if (targetType) {
5481
5481
if ((targetType.flags & TypeFlags.Any) && !(originalSource.flags & TypeFlags.Primitive)) {
5482
- // non-primitive assignment to any is always allowed, eg
5482
+ // non-primitive assignment to any is always allowed, eg
5483
5483
// `var x: { [index: string]: any } = { property: 12 };`
5484
5484
return Ternary.True;
5485
5485
}
@@ -5509,7 +5509,7 @@ namespace ts {
5509
5509
let targetType = getIndexTypeOfType(target, IndexKind.Number);
5510
5510
if (targetType) {
5511
5511
if ((targetType.flags & TypeFlags.Any) && !(originalSource.flags & TypeFlags.Primitive)) {
5512
- // non-primitive assignment to any is always allowed, eg
5512
+ // non-primitive assignment to any is always allowed, eg
5513
5513
// `var x: { [index: number]: any } = { property: 12 };`
5514
5514
return Ternary.True;
5515
5515
}
@@ -6586,9 +6586,9 @@ namespace ts {
6586
6586
return;
6587
6587
}
6588
6588
6589
- // 1. walk from the use site up to the declaration and check
6589
+ // 1. walk from the use site up to the declaration and check
6590
6590
// if there is anything function like between declaration and use-site (is binding/class is captured in function).
6591
- // 2. walk from the declaration up to the boundary of lexical environment and check
6591
+ // 2. walk from the declaration up to the boundary of lexical environment and check
6592
6592
// if there is an iteration statement in between declaration and boundary (is binding/class declared inside iteration statement)
6593
6593
6594
6594
let container: Node;
@@ -11631,14 +11631,14 @@ namespace ts {
11631
11631
//
11632
11632
// When we get the type of the `Promise` symbol here, we get the type of the static
11633
11633
// side of the `Promise` class, which would be `{ new <T>(...): Promise<T> }`.
11634
-
11634
+
11635
11635
let promiseType = getTypeFromTypeNode(node.type);
11636
11636
if (promiseType === unknownType && compilerOptions.isolatedModules) {
11637
11637
// If we are compiling with isolatedModules, we may not be able to resolve the
11638
11638
// type as a value. As such, we will just return unknownType;
11639
11639
return unknownType;
11640
11640
}
11641
-
11641
+
11642
11642
let promiseConstructor = getNodeLinks(node.type).resolvedSymbol;
11643
11643
if (!promiseConstructor || !symbolIsValue(promiseConstructor)) {
11644
11644
let typeName = promiseConstructor
0 commit comments