godotjs / godotjs/javascript

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

オープン
#96 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
documentation investigation
主要言語
C++
スター
1.1k
フォーク
80
PR マージ指標
30日以内にマージされた PR はありません

説明

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?

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。