Creating new `webapp-libs` package without importing `@sb/webapp-core/types/styled` will cause type-check errors
mkleszcz opened this issue · comments
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
- Create a new webapp package in
webapp-libs
without importing@sb/webapp-core/types/styled
- Run
type-check
on this package - Observe error
System Info
.
Logs
No response
Validations
- Follow our Code of Conduct.
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.