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

Creating new webapp-libs package without importing @sb/webapp-core/types/styled will cause type-check errors #502

Open
5 tasks done
mkleszcz opened this issue Mar 13, 2024 · 0 comments
Labels
bug Something isn't working enhancement New feature or request javascript Pull requests that update Javascript code

Comments

@mkleszcz
Copy link
Contributor

Describe the bug

When creating new package in webapp-libs, it is required to add src/types/index.d.ts file in newly created package with the
import '@sb/webapp-core/types/styled';. If this file or import doesn't exist the type-check task will throw an error:

> tsc --noEmit --project tsconfig.lib.json
../webapp-core/src/hooks/useMediaQuery/useMediaQuery.hook.ts(23,52): error TS4111: Property 'activeBreakpoint' comes from an index signature, so it must be accessed with ['activeBreakpoint'].

We need to somehow change this type override because the error doesn't lead to core of the issue and debuging it takes a lot of time.

Steps to reproduce

  1. Create a new webapp package in webapp-libs without importing @sb/webapp-core/types/styled
  2. Run type-check on this package
  3. Observe error

System Info

.

Logs

No response

Validations

@mkleszcz mkleszcz added bug Something isn't working enhancement New feature or request javascript Pull requests that update Javascript code labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request javascript Pull requests that update Javascript code
Projects
None yet
Development

No branches or pull requests

1 participant