refactor(src/lib): 3 - convert remaining JS files to TypeScript - #137
Draft
sukhada wants to merge 1 commit into
Draft
refactor(src/lib): 3 - convert remaining JS files to TypeScript#137sukhada wants to merge 1 commit into
sukhada wants to merge 1 commit into
Conversation
Convert all 6 remaining .js files in src/lib/ to TypeScript: - constants.js → constants.ts (trivial rename) - is-client.js → is-client.ts (add return type) - request-logging.js → request-logging.ts (add express types) - zip-format.js → zip-format.ts (add ZipRange type, typed params) - timezones.js → timezones.ts (add interface types for contact/campaign) - interaction-step-helpers.js → interaction-step-helpers.ts (add BaseInteractionStep/TreeNode interfaces, remove isModel param since only GraphQL path is used after dead code removal in PR 1a) Add ESLint override for src/lib/**/*.ts enforcing: - @typescript-eslint/no-explicit-any: error - @typescript-eslint/explicit-module-boundary-types: error Update interaction-step-helpers.spec.ts to remove tests for interactionStepForId (deleted in PR 1a) and update getTopMostParent calls to match new single-arg signature. src/lib/ is now 100% TypeScript — zero .js files remain. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Converts all 6 remaining
.jsfiles insrc/lib/to TypeScript and adds stricter ESLint rules for the directory.Conversions:
constants.js→.ts(trivial rename)is-client.js→.ts(add return type)request-logging.js→.ts(add Express types for handler params)zip-format.js→.ts(addZipRangetuple type, typed params/returns)timezones.js→.ts(addContactWithTimezone/CampaignWithHoursinterfaces)interaction-step-helpers.js→.ts(addBaseInteractionStep/TreeNodeinterfaces, simplify to single path sinceisModeldead code was removed in PR 1a)ESLint override for
src/lib/**/*.ts:@typescript-eslint/no-explicit-any: error@typescript-eslint/explicit-module-boundary-types: errorTest updates:
interactionStepForIdtests (function deleted in PR 1a)getTopMostParentcalls to match simplified single-arg signaturesrc/lib/is now 100% TypeScript — zero.jsfiles remain.Stacked on: #136
Test plan
🤖 Generated with Claude Code