Downgrade styled-components to v5 for TypeScript compatibility

- Downgrade styled-components from v6.1.1 to v5.3.11
- Add @types/styled-components for v5 type definitions
- Simplify styled.ts export (v5 uses default export)
- Remove tsconfig skipLibCheck workaround (not needed with v5)
- Add string-replace-loader dependency for webpack
- Update @pezkuwi/dev to 0.85.4 (includes rollup config export fix)

This fixes TS2742 declaration emit errors that prevented npm
package builds while allowing Chrome/Firefox extension bundles.
This commit is contained in:
Kurdistan Tech Ministry committed 2026-01-17 21:08:55 +03:00
1 parent ebe8d5c499
commit f123bbfacc
6 files changed
+217 -40

No files matched your search

+1 -12
View File
@@ -1,15 +1,4 @@
// Copyright 2019-2026 @pezkuwi/extension-ui authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { styled } from 'styled-components';
import type { IStyledComponent, RuleSet } from 'styled-components';
// Re-export styled with proper types to avoid TS2742 errors in declaration files
export { styled };
// Helper type for styled component exports - ensures TypeScript can emit declarations
// without referencing internal styled-components paths
export type StyledComponentType<Props extends object = object> = IStyledComponent<'web', Props>;
// Type for the css template literal result
export type StyledCSS<Props extends object = object> = RuleSet<Props>;
export { default as styled } from 'styled-components';