From ebe8d5c49982e24b34171b96cfd26f7cb5f6fec2 Mon Sep 17 00:00:00 2001 From: Kurdistan Tech Ministry Date: Sat, 17 Jan 2026 19:51:56 +0300 Subject: [PATCH] fix: add type exports to styled.ts for TypeScript declaration compatibility --- packages/extension-ui/src/styled.ts | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/extension-ui/src/styled.ts b/packages/extension-ui/src/styled.ts index e15c4e7..af6fa84 100644 --- a/packages/extension-ui/src/styled.ts +++ b/packages/extension-ui/src/styled.ts @@ -1,4 +1,15 @@ // Copyright 2019-2026 @pezkuwi/extension-ui authors & contributors // SPDX-License-Identifier: Apache-2.0 -export { styled } from 'styled-components'; +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 = IStyledComponent<'web', Props>; + +// Type for the css template literal result +export type StyledCSS = RuleSet;