Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: migrate to TypeScript with full type definitions 🏷️ #39

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

manavm1990
Copy link
Contributor

TypeScript Migration

This PR migrates the package to TypeScript and modernizes the build system while maintaining full compatibility with both TypeScript and JavaScript projects.

Changes

  • Convert source files to TypeScript with proper type definitions
  • Add TypeScript declarations for Tailwind internal utilities
  • Implement modern build system using tsup
  • Support both ESM and CommonJS module formats
  • Add source maps for better debugging
  • Maintain backwards compatibility with existing JavaScript usage

Testing

  • Verified working in TypeScript projects with full type support
  • Verified working in JavaScript projects without breaking changes
  • Package builds successfully with proper module outputs
  • All type definitions are properly generated and exported

No breaking changes - existing consumers of the package should work without modification.

Deliverables

  • TypeScript source files with complete type definitions
  • Updated build configuration using tsup
  • ESM and CommonJS module outputs
  • Source maps for debugging
  • Updated documentation in README for TypeScript users

Add type declarations for flattenColorPalette utility with proper typing for
nested color objects. This improves type safety when working with Tailwind's
color palette system by replacing `any` with specific color value types.
- Add proper types to all src files
- Fix CSS value type issues (convert numbers to strings)
- Add type-safety for spring multipliers and utility options
- Add .js extensions for ESM compatibility
- Add TypeScript declarations and build output configuration
- Configure dual ESM/CJS package exports
- Add 'dist/' directory to published files
- Update package entry points for TypeScript support
- Add build scripts for type checking and compilation

The package can now be used in both TypeScript and JavaScript projects
with proper type definitions. Build artifacts are generated in the dist/
directory while maintaining source files in src/.
feat: 🏷️ add strong typing to theme functions in baseAnimations.ts

feat: 🏷️
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.

1 participant