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 eda9133 commit e829fa0Copy full SHA for e829fa0
src/compiler/checker.ts
@@ -13234,11 +13234,7 @@ namespace ts {
13234
attributesArray = [];
13235
attributesTable = createMap<Symbol>();
13236
}
13237
- const exprType = checkExpression(attributeDecl.expression);
13238
- if (!isValidSpreadType(exprType)) {
13239
- error(attributeDecl, Diagnostics.Spread_types_may_only_be_created_from_object_types);
13240
- hasSpreadAnyType = true;
13241
- }
+ const exprType = getApparentType(checkExpression(attributeDecl.expression))
13242
if (isTypeAny(exprType)) {
13243
hasSpreadAnyType = true;
13244
0 commit comments