diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 8c9b818cd79..6cdad32751c 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -13890,7 +13890,7 @@ namespace ts { // type with those properties for which the binding pattern specifies a default value. if (contextualTypeHasPattern) { for (const prop of getPropertiesOfType(contextualType)) { - if (!propertiesTable.get(prop.escapedName)) { + if (!propertiesTable.get(prop.escapedName) && !(spread && getPropertyOfType(spread, prop.escapedName))) { if (!(prop.flags & SymbolFlags.Optional)) { error(prop.valueDeclaration || (prop).bindingElement, Diagnostics.Initializer_provides_no_value_for_this_binding_element_and_the_binding_element_has_no_default_value);