Skip to content

Conversation

@OpenStaxClaude
Copy link
Contributor

Summary

Converts JavaScript files in src/app/layouts/default/microsurvey-popup to TypeScript as part of the migration effort tracked in CORE-1386.

Changes

  • adoption-content.tsx: Added proper TypeScript types for cookie management, dismissal hooks, and component types
  • queue.tsx: Typed the microsurvey queue system with MicrosurveyComponent and UseContentHook types
  • sticky-content.tsx: Created StickyData type for sticky note content structure and typed all hook returns

Guidelines Followed

  • Avoided using any type
  • Preferred type over interface
  • Relied on type inference where possible
  • Used inline type definitions for function parameters
  • Kept line lengths under 120 characters
  • Each file ends with a blank line

Related Issue

https://openstax.atlassian.net/browse/CORE-1386

🤖 Generated with Claude Code

- Convert adoption-content.js to TypeScript with proper return types
- Convert queue.js to TypeScript with typed queue and component types
- Convert sticky-content.js to TypeScript with StickyData type
- Add React.ComponentType for microsurvey components
- Type all hook parameters and return values
- Add proper types for cookie reducer and dismissal logic

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
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