Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest TS type definitions break the whole project with unclear errors when migrating from 0.3.2 to 0.4.1-rc.0 #161

Closed
mathfox opened this issue Dec 9, 2024 · 1 comment · May be fixed by #162
Labels
bug Something isn't working

Comments

@mathfox
Copy link

mathfox commented Dec 9, 2024

After migrating from 0.3.2 to 0.4.1-rc.0 a list of type errors popped up when building the project.

The first kind of errors:

Argument of type 'Entity<MY_COMPONENT>' is not assignable to parameter of type 'Entity<undefined>'.
  Type 'Entity<MY_COMPONENT>' is not assignable to type '{ __jecs_value: undefined; }'.
    Types of property '__jecs_value' are incompatible.
      Type 'MY_COMPONENT' is not assignable to type 'undefined'.

The second kind of errors:

Argument of type 'unknown' is not assignable to parameter of type 'T'.
  'T' could be instantiated with an arbitrary type which could be unrelated to 'unknown'.
  world.set(entity, component, componentData)

The latest types seem to be inconsistent with the "flecs" terminology "jecs" relies on.

@EncodedVenom
Copy link
Collaborator

Closing because of this rationale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants