Skip to content

Add TypeScript types to submodule exports#582

Merged
argyleink merged 2 commits intomainfrom
copilot/improve-typescript-support
Jan 31, 2026
Merged

Add TypeScript types to submodule exports#582
argyleink merged 2 commits intomainfrom
copilot/improve-typescript-support

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 31, 2026

Submodule imports (open-props/src/animations, open-props/src/colors, etc.) lack TypeScript type definitions in their export mappings, causing type resolution failures.

Changes

  • package.json: Convert submodule exports from string paths to conditional exports with explicit types field
  • tsconfig.json: Add src/index.js to include array for type generation
  • gen:types script: Clean existing .d.ts files before regeneration to avoid TS5055 overwrite errors
  • tests: Add verification that all submodule type definitions are generated

Usage

import Animations from 'open-props/src/animations';
import Colors from 'open-props/src/colors';

// Types now properly resolve
const fadeIn: string = Animations['--animation-fade-in'];
const gray0: string = Colors['--gray-0'];

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@bolt-new-by-stackblitz
Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@netlify
Copy link
Copy Markdown

netlify bot commented Jan 31, 2026

Deploy Preview for open-props canceled.

Name Link
🔨 Latest commit 8f16b4b
🔍 Latest deploy log https://app.netlify.com/projects/open-props/deploys/697d9f50ce27640008c0861a

Copilot AI changed the title [WIP] Improve TypeScript support and integrations for package exports Add TypeScript types to submodule exports Jan 31, 2026
Copilot AI requested a review from argyleink January 31, 2026 06:22
@argyleink argyleink marked this pull request as ready for review January 31, 2026 06:27
@argyleink argyleink merged commit 173a47e into main Jan 31, 2026
6 checks passed
@argyleink argyleink deleted the copilot/improve-typescript-support branch January 31, 2026 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants