godotjs / godotjs/javascript

Typescript complains when trying to use operators such as += on Vector2

Abierto
#96 3 comentarios 0 reacciones 0 asignados Ver en GitHub
documentation investigation
Lenguaje dominante
C++
Estrellas
1.1k
Forks
80
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

e.g. Something like this:

```typescript
this.position += new godot.Vector2(this.velocity * delta)
```

Will generate the following error in typescript:

```error
Operator '+=' cannot be applied to types 'godot.Vector2' and this.position + 'godot.
—————————————————
The left-hand side of an arithmetic operation must be of type godot.register_property 'any', 'number', 'bigint' or an enum type.
```

Is this an error on my part of a problem wit the type declaration?

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.