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

Bug: incorrect types #555

Open
elsassph opened this issue Dec 13, 2024 · 1 comment
Open

Bug: incorrect types #555

elsassph opened this issue Dec 13, 2024 · 1 comment
Labels

Comments

@elsassph
Copy link
Contributor

Problem/Opportunity

1/ When compiling with TypeScript (5.3.3+) without skipLibCheck: false, a number of errors are reported:

Error: /Users/[...]/node_modules/@lightningjs/core/dist/src/components/BloomComponent.d.mts:52:3 - (TS2578) Unused '@ts-expect-error' directive.
Error: /Users/[...]/node_modules/@lightningjs/core/dist/src/components/BorderComponent.d.mts:131:3 - (TS2578) Unused '@ts-expect-error' directive.
Error: /Users/[...]/node_modules/@lightningjs/core/dist/src/components/FastBlurComponent.d.mts:54:3 - (TS2578) Unused '@ts-expect-error' directive.
Error: /Users/[...]/node_modules/@lightningjs/core/dist/src/components/SmoothScaleComponent.d.mts:40:3 - (TS2578) Unused '@ts-expect-error' directive.

It can be fixed with skipLibCheck but this means modifying tsconfig.json of a large number of libraries.

2/ Missing ES types exports
Everything in lng.types should also be available directly

src/types/lng.types.namespace.d.mts

3/ Missing members in declarations:

Texture.enableClipping(x,y,w,h)
ObjectList.getIndex(item)

4/ Missing/incorrect return type in declaration

Element.setSmooth(): void // should be the transition
Texture._getSourceLoader() // loader callback can optionally return a cancel cb (needed for images)

Steps to reproduce

No response

Expected Behavior

Types are accurate

Actual Behavior

Types have gaps / bugs

Notes (Optional)

No response

@elsassph elsassph added the bug label Dec 13, 2024
@elsassph
Copy link
Contributor Author

Working on it, BTW

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant