@@ -107,19 +107,27 @@ export function simplifyPropertySnaks (propertySnaks: PropertySnaks, options: Si
107107 return applyArraySimplification ( propertySnaks , simplifySnak , options )
108108}
109109
110- function applyObjectSimplification ( obj , fn , options ) {
110+ function applyObjectSimplification (
111+ obj : Claims | Snaks ,
112+ simplifyFn : typeof simplifyPropertyClaims | typeof simplifyPropertySnaks ,
113+ options : SimplifyClaimsOptions | SimplifySnaksOptions ,
114+ ) {
111115 const { propertyPrefix } = options
112116 const simplified = { }
113117 for ( let [ propertyId , propertyArray ] of Object . entries ( obj ) ) {
114118 if ( propertyPrefix ) {
115119 propertyId = propertyPrefix + ':' + propertyId
116120 }
117- simplified [ propertyId ] = fn ( propertyArray , options )
121+ simplified [ propertyId ] = simplifyFn ( propertyArray , options )
118122 }
119123 return simplified
120124}
121125
122- function applyArraySimplification ( array , simplifyFn , options ) {
126+ function applyArraySimplification (
127+ array : PropertyClaims | PropertySnaks ,
128+ simplifyFn : typeof simplifyClaim | typeof simplifySnak ,
129+ options : SimplifyClaimsOptions | SimplifySnaksOptions ,
130+ ) {
123131 const simplifiedArray = array
124132 . map ( claimOrSnak => simplifyFn ( claimOrSnak , options ) )
125133 // Filter-out novalue and somevalue claims,
0 commit comments