Skip to content

type errors on addEventListener for any class that extends from EventDispatcher #387

Open
@RodrigoHamuy

Description

  • @types/three version: from 0.168.0
  • three-stdlib version: 2.34.0

Problem description:

@types/three introduced on v168 the breaking change that unknown events can no longer be dispatched in EventDispatcher (source).

Relevant code:

So now this will throw TS errors:

import { OrbitControls } from "three-stdlib";

const orbit = new OrbitControls();

orbit.addEventListener("start", ()=> console.log('started'));
// Argument of type 'string' is not assignable to parameter of type 'never'.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions