Skip to content

feat!: convert react-interpolate to TypeScript#55

Merged
gnapse merged 7 commits into
nextfrom
ernesto/convert-to-typescript
May 21, 2026
Merged

feat!: convert react-interpolate to TypeScript#55
gnapse merged 7 commits into
nextfrom
ernesto/convert-to-typescript

Conversation

@gnapse
Copy link
Copy Markdown

@gnapse gnapse commented May 21, 2026

This PR converts react-interpolate source and tests to TypeScript, replaces the handwritten declaration file with generated declarations, and updates the existing build/test tooling to support TS inputs.

It also tightens the parser/token/AST typing model and enables stricter TypeScript compiler checks, including isolated declaration emit.

The published CJS and ESM entry points are preserved, and runtime behavior was compared against v2.2.2 for documented usage.

Validation: npm run typecheck, npm run lint, npm test -- --runInBand, and npm run build.

Reference

@gnapse gnapse changed the title [codex] Convert react-interpolate to TypeScript feat!: convert react-interpolate to TypeScript May 21, 2026
@gnapse gnapse self-assigned this May 21, 2026
@gnapse gnapse marked this pull request as ready for review May 21, 2026 17:27
Copy link
Copy Markdown
Member

@doistbot doistbot left a comment

Choose a reason for hiding this comment

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

This PR successfully converts react-interpolate to TypeScript, updating the build tooling and tightening the AST and parser typings while preserving the existing CJS and ESM entry points. This is a highly valuable upgrade that establishes a stricter, more reliable foundation for future development. A few areas have been flagged for further review, including managing Babel runtime dependencies, ensuring type compatibility for CommonJS consumers, narrowing overly broad types, and addressing a few minor performance, test isolation, and infinite loop edge cases.

Share FeedbackReview Logs

Comment thread rollup.config.js
Comment thread package.json
Comment thread src/interpolate.tsx Outdated
Comment thread src/lexer.ts Outdated
Comment thread src/lexer.ts
Comment thread src/interpolate.tsx
Comment thread src/parser.ts Outdated
Comment thread __test__/Interpolate.test.tsx Outdated
Comment thread __test__/Interpolate.test.tsx
@gnapse gnapse requested review from a team and craigcarlyle and removed request for a team May 21, 2026 18:36
@gnapse gnapse merged commit c8a0f88 into next May 21, 2026
3 checks passed
@gnapse gnapse deleted the ernesto/convert-to-typescript branch May 21, 2026 18:38
@craigcarlyle
Copy link
Copy Markdown

🔥 ✅

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.

3 participants