Skip to content

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

Open
@ceuk

Description

@ceuk

e.g. Something like this:

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

Will generate the following error in typescript:

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationRequest/proposal related to documenationinvestigationNeeds some investigation

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions