@fimbul/mimir
Advanced tools
Comparing version 0.16.0-dev.20181026 to 0.16.0-dev.20181031
{ | ||
"name": "@fimbul/mimir", | ||
"version": "0.16.0-dev.20181026", | ||
"version": "0.16.0-dev.20181031", | ||
"description": "Core rules of the Fimbullinter project", | ||
@@ -5,0 +5,0 @@ "main": "recommended.yaml", |
@@ -79,3 +79,3 @@ "use strict"; | ||
const type = this.checker.getTypeAtLocation(node); | ||
return tsutils_1.unionTypeParts(type).map(getPropertyInfoFromType).reduce(combinePropertyInfo); | ||
return tsutils_1.unionTypeParts(type).map(getPropertyInfoFromType).reduce(unionPropertyInfo); | ||
} | ||
@@ -89,2 +89,4 @@ }; | ||
function getPropertyInfoFromType(type) { | ||
if (tsutils_1.isIntersectionType(type)) | ||
return type.types.map(getPropertyInfoFromType).reduce(intersectPropertyInfo); | ||
if (!tsutils_1.isObjectType(type)) | ||
@@ -114,3 +116,3 @@ return emptyPropertyInfo; | ||
} | ||
function combinePropertyInfo(a, b) { | ||
function unionPropertyInfo(a, b) { | ||
return { | ||
@@ -122,2 +124,9 @@ known: a.known && b.known, | ||
} | ||
function intersectPropertyInfo(a, b) { | ||
return { | ||
known: a.known && b.known, | ||
names: [...a.names, ...b.names], | ||
assignedNames: [...a.assignedNames, ...b.assignedNames], | ||
}; | ||
} | ||
//# sourceMappingURL=no-duplicate-spread-property.js.map |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
422488
4234