Skip to content

Conversation

@caseycarroll
Copy link

Closes #223

What

Adds type declaration file for each core package.

Why

TypeScript consumers of makeup-js must provide ambient module declarations for makeup exports.

How

I used an LLM to consider the README and implementations of each export to infer correct type definitions. Definitions are documented via TSDoc conventions.

Types are included in /dist dir of each package. Each package config defines "types" to point to its respective type file.

Ideal solution involves migrating libraries to TS. The team plans to migrate to new repo in the future, so this low effort patch seems more appropriate.

@ianmcburnie ianmcburnie requested a review from Copilot January 7, 2026 00:33
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds TypeScript type declaration files to all core makeup-js packages to improve TypeScript support without requiring a full migration to TypeScript.

  • Adds index.d.ts type declaration files to the /dist directory of each core package
  • Updates package.json files to reference the new type declarations via types field
  • Includes type declaration files in the published package files array

Reviewed changes

Copilot reviewed 13 out of 26 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/core/makeup-typeahead/package.json Adds type declaration references for the typeahead package
packages/core/makeup-screenreader-trap/package.json Adds type declaration references for the screenreader trap package
packages/core/makeup-roving-tabindex/package.json Adds type declaration references for the roving tabindex package
packages/core/makeup-prevent-scroll-keys/package.json Adds type declaration references for the prevent scroll keys package
packages/core/makeup-next-id/package.json Adds type declaration references for the next-id package
packages/core/makeup-navigation-emitter/package.json Adds type declaration references for the navigation emitter package
packages/core/makeup-modal/package.json Adds type declaration references for the modal package
packages/core/makeup-keyboard-trap/package.json Adds type declaration references for the keyboard trap package
packages/core/makeup-key-emitter/package.json Adds type declaration references for the key emitter package
packages/core/makeup-focusables/package.json Adds type declaration references for the focusables package
packages/core/makeup-expander/package.json Adds type declaration references for the expander package
packages/core/makeup-exit-emitter/package.json Adds type declaration references for the exit emitter package
packages/core/makeup-active-descendant/package.json Adds type declaration references for the active descendant package

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@LuLaValva LuLaValva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this @caseycarroll! Since types don't effect functionality it should be okay to merge as-is and we can do a follow-up if any issues come up later.

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.

Add module type declaration for makeup-focusables

2 participants