coreui / coreui-utils

CoreUI JavaScript utility functions
MIT License
6 stars 8 forks source link

Error after upgrading from v1.3.1 to v2.0.0 #20

Open digidhamu opened 1 year ago

digidhamu commented 1 year ago

Could you please advise on this as I am getting below error when I try to upgrade from v1.3.1 to v2.0.0.

ERROR in node_modules/@coreui/utils/src/deepObjectsMerge.ts:11:9
TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{}'.
  No index signature with a parameter of type 'string' was found on type '{}'.
     9 |   // Iterate through `source` properties and if an `Object` set property to merge of `target` and `source` properties
    10 |   for (const key of Object.keys(source)) {
  > 11 |     if (source[key] instanceof Object) {
       |         ^^^^^^^^^^^
    12 |       Object.assign(source[key], deepObjectsMerge(target[key], source[key]))
    13 |     }
    14 |   }

ERROR in node_modules/@coreui/utils/src/deepObjectsMerge.ts:12:21
TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{}'.
  No index signature with a parameter of type 'string' was found on type '{}'.
    10 |   for (const key of Object.keys(source)) {
    11 |     if (source[key] instanceof Object) {
  > 12 |       Object.assign(source[key], deepObjectsMerge(target[key], source[key]))
       |                     ^^^^^^^^^^^
    13 |     }
    14 |   }
    15 |

ERROR in node_modules/@coreui/utils/src/deepObjectsMerge.ts:12:51
TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{}'.
  No index signature with a parameter of type 'string' was found on type '{}'.
    10 |   for (const key of Object.keys(source)) {
    11 |     if (source[key] instanceof Object) {
  > 12 |       Object.assign(source[key], deepObjectsMerge(target[key], source[key]))
       |                                                   ^^^^^^^^^^^
    13 |     }
    14 |   }
    15 |

ERROR in node_modules/@coreui/utils/src/deepObjectsMerge.ts:12:64
TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{}'.
  No index signature with a parameter of type 'string' was found on type '{}'.
    10 |   for (const key of Object.keys(source)) {
    11 |     if (source[key] instanceof Object) {
  > 12 |       Object.assign(source[key], deepObjectsMerge(target[key], source[key]))
       |                                                                ^^^^^^^^^^^
    13 |     }
    14 |   }
    15 |

ERROR in node_modules/@coreui/utils/src/omitByKeys.ts:12:36
TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{}'.
  No index signature with a parameter of type 'string' was found on type '{}'.
    10 |   const objKeys = Object.keys(originalObject)
    11 |   for (let i = 0; i < objKeys.length; i++) {
  > 12 |     !keys.includes(objKeys[i]) && (newObj[objKeys[i]] = originalObject[objKeys[i]])
       |                                    ^^^^^^^^^^^^^^^^^^
    13 |   }
    14 |   return newObj
    15 | }

ERROR in node_modules/@coreui/utils/src/omitByKeys.ts:12:57
TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{}'.
  No index signature with a parameter of type 'string' was found on type '{}'.
    10 |   const objKeys = Object.keys(originalObject)
    11 |   for (let i = 0; i < objKeys.length; i++) {
  > 12 |     !keys.includes(objKeys[i]) && (newObj[objKeys[i]] = originalObject[objKeys[i]])
       |                                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^
    13 |   }
    14 |   return newObj
    15 | }

ERROR in node_modules/@coreui/utils/src/pickByKeys.ts:11:5
TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{}'.
  No index signature with a parameter of type 'string' was found on type '{}'.
     9 |   const newObj = {}
    10 |   for (let i = 0; i < keys.length; i++) {
  > 11 |     newObj[keys[i]] = originalObject[keys[i]]
       |     ^^^^^^^^^^^^^^^
    12 |   }
    13 |   return newObj
    14 | }

ERROR in node_modules/@coreui/utils/src/pickByKeys.ts:11:23
TS7053: Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{}'.
  No index signature with a parameter of type 'string' was found on type '{}'.
     9 |   const newObj = {}
    10 |   for (let i = 0; i < keys.length; i++) {
  > 11 |     newObj[keys[i]] = originalObject[keys[i]]
       |                       ^^^^^^^^^^^^^^^^^^^^^^^
    12 |   }
    13 |   return newObj
    14 | }
digidhamu commented 1 year ago

Would be great if you can help on this

digidhamu commented 1 year ago

Can I continue invest on CoreUI Framework as issue is not addressed for long period? Note that I have already bought CoreUI Pro of React and VueJS.

annie956 commented 1 year ago

Facing the same issue as well, any fixes?

Krank3n commented 9 months ago

Also facing this issue, would love to get some insights?

I downgraded back to 1.3.1 and everything is working.