Online-IDE
Online-IDE copied to clipboard
Error: Conversion of type 'string' to type 'number' in SpriteManager
My build fails because the data types cannot be converted. I have "fix" aka ignored it by adding an <unknown>
before the <number>
cast.
https://github.com/martin-pabst/Online-IDE/blob/dcba90beee2a4805b8d88d0d1bd14ce3682d77bc/src/client/spritemanager/SpriteManager.ts#L268
src/client/spritemanager/SpriteManager.ts:268:63 - error TS2352: Conversion of type 'string' to type 'number' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
268 $indexInput.on("input", () => { imageData.index = <number>$indexInput.val(); that.checkSeriesAndIndexesAndSetNextSpriteIndex(); })
~~~~~~~~~~~~~~~~~~~~~~~~~
Found 1 error in src/client/spritemanager/SpriteManager.ts:268