Skip to content
This repository was archived by the owner on Nov 12, 2024. It is now read-only.
This repository was archived by the owner on Nov 12, 2024. It is now read-only.

origin comp making GameObj type inference not working #451

@slmjkdbtl

Description

@slmjkdbtl

Version

v2000.1

What browsers are you seeing the problem on?

No response

What happened?

window.origin exists in browser and ts default definitions, which confuses ts with kaboom's own origin(): OriginComp, making game object type inference not working

What's the expected behavior?

window.origin should give kaboom's definition

Minimum reproducable code

// this will be a GameObj<any> instead of a GameObj<PosComp | RectComp | OriginComp>
const thing = add([
    pos(120),
    rect(80, 40),
    origin("center"),
])

Live demo

No response

Is there an existing issue for this?

  • I've searched and there is no existing issue for this bug

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions