We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 074ed9f commit f6ace2dCopy full SHA for f6ace2d
src/compiler/checker.ts
@@ -3106,6 +3106,12 @@ namespace ts {
3106
}
3107
3108
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
3115
3116
else {
3117
// Use explicitly specified property name ({ p: xxx } form), or otherwise the implied name ({ p } form)
0 commit comments