apptension / saas-boilerplate

SaaS Boilerplate - Open Source and free SaaS stack that lets you build SaaS products faster in React, Django and AWS. Focus on essential business logic instead of coding repeatable features!

Home Page:https://apptension.com/saas-boilerplate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

  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