[Solved] TS error: element implicitly has the type ‘any’ because the type of the index expression is not ‘number’‘


When developing my gift package for VIP requirements, I encountered a TS error reporting element that implicitly has the type of “any”, because the type of index expression is not ‘number’‘


1. The wrong wording is:


2. The correct wording is:

(window as any).CESIUM_BASE_URL = 'src/assets/cesium/';

Similar Posts: