Build is broken due to type checking error
barzamin opened this issue · 0 comments
barzamin commented
Describe the bug
Building Neko fails with the error
ERROR in /workspace/client/src/components/video.vue(414,7):
414:7 No overload matches this call.
Overload 1 of 2, '(event: "wheel" | "mousemove", data: { x: number; y: number; }): void', gave the following error.
Argument of type '"keyup"' is not assignable to parameter of type '"wheel" | "mousemove"'.
Overload 2 of 2, '(event: "mousedown" | "mouseup" | "keydown" | "keyup", data: { key: number; }): void', gave the following error.
Type 'string' is not assignable to type 'number'.
412 | let keys = Object.keys(this.activeKeys)
413 | for(let key of keys) {
> 414 | this.$client.sendData('keyup', { key })
| ^
415 | delete this.activeKeys[key]
416 | }
417 | }
Cause
Object.keys(x)
will always return a string[]
; however, keys
needs to be stored as number
s for the sendData()
call to typecheck.