Ignore data- props when excess property checking (#36952)

This commit is contained in:
Wesley Wigham
2020-02-25 15:52:24 -08:00
committed by GitHub
parent d92aca2715
commit e99173a6f9
5 changed files with 96 additions and 1 deletions

View File

@@ -15378,7 +15378,7 @@ namespace ts {
checkTypes = reducedTarget.flags & TypeFlags.Union ? (<UnionType>reducedTarget).types : [reducedTarget];
}
for (const prop of getPropertiesOfType(source)) {
if (shouldCheckAsExcessProperty(prop, source.symbol)) {
if (shouldCheckAsExcessProperty(prop, source.symbol) && !isIgnoredJsxProperty(source, prop)) {
if (!isKnownProperty(reducedTarget, prop.escapedName, isComparingJsxAttributes)) {
if (reportErrors) {
// Report error in terms of object types in the target as those are the only ones