fix: add type exports to styled.ts for TypeScript declaration compatibility

This commit is contained in:
2026-01-17 19:51:56 +03:00
parent 0bd174ccd6
commit ebe8d5c499
+12 -1
View File
@@ -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<Props extends object = object> = IStyledComponent<'web', Props>;
// Type for the css template literal result
export type StyledCSS<Props extends object = object> = RuleSet<Props>;