Skip to content

Commit f6ace2d

Browse files
committed
Rest of untyped binding pattern is back to any
1 parent 074ed9f commit f6ace2d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/compiler/checker.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3106,6 +3106,12 @@ namespace ts {
31063106
}
31073107
}
31083108
type = getRestType(parentType, literalMembers, declaration.symbol);
3109+
if (getPropertiesOfObjectType(type).length === 0 && getIndexTypeOfType(type, IndexKind.String) === anyType) {
3110+
if (compilerOptions.noImplicitAny) {
3111+
reportImplicitAnyError(declaration, anyType);
3112+
}
3113+
return anyType;
3114+
}
31093115
}
31103116
else {
31113117
// Use explicitly specified property name ({ p: xxx } form), or otherwise the implied name ({ p } form)

0 commit comments

Comments
 (0)