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 47bd4d3 commit bb1125aCopy full SHA for bb1125a
src/compiler/checker.ts
@@ -13285,11 +13285,7 @@ namespace ts {
13285
attributesArray = [];
13286
attributesTable = createMap<Symbol>();
13287
}
13288
- const exprType = checkExpression(attributeDecl.expression);
13289
- if (!isValidSpreadType(exprType)) {
13290
- error(attributeDecl, Diagnostics.Spread_types_may_only_be_created_from_object_types);
13291
- hasSpreadAnyType = true;
13292
- }
+ const exprType = getApparentType(checkExpression(attributeDecl.expression))
13293
if (isTypeAny(exprType)) {
13294
hasSpreadAnyType = true;
13295
0 commit comments