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

chore(js-ts): Convert api-context to TypeScript #3985

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

devin-ai-integration[bot]
Copy link
Contributor

chore(js-ts): Convert api-context to TypeScript

This PR converts the components in src/elements/common/api-context from JavaScript to TypeScript:

  • APIContext.jsAPIContext.ts
  • index.jsindex.ts
  • withAPIContext.jswithAPIContext.tsx

Changes

  • Removed Flow annotations
  • Converted Flow's optional type syntax ?API() to TypeScript's union type API | null
  • Added a default value of null to the React.createContext call
  • Created a proper interface WithAPIProps for components that receive the API context
  • Made the HOC generic with proper type annotations for the forwardRef

Testing

  • Verified that TypeScript compilation passes
  • Verified that all tests pass
  • Verified that linting passes

Link to Devin run: https://app.devin.ai/sessions/47431fa2f3294a16a0f9f680e9f9a7b5

Co-Authored-By: Joseph Gross [email protected]

@devin-ai-integration devin-ai-integration bot requested review from a team as code owners February 27, 2025 03:46
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add "(aside)" to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

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.

0 participants