refactor: convert exported arrow consts to function declarations#1048
Draft
HerringtonDarkholme wants to merge 3 commits into
Draft
refactor: convert exported arrow consts to function declarations#1048HerringtonDarkholme wants to merge 3 commits into
HerringtonDarkholme wants to merge 3 commits into
Conversation
Replace `export const foo = (...) => {...}` with `export function foo(...) {...}`
across all packages (sdk, ui, hooks, wallet adapters). Typed React components
(`FC<Props>`) move the prop type onto the parameter and drop the now-unused
FC import.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
|
@HerringtonDarkholme is attempting to deploy a commit to the Uneven Labs Team on Vercel. A member of the Team first needs to authorize it. |
Co-Authored-By: Claude Opus 4.8 (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 every
export const foo = (...) => {...}arrow function to anexport function foo(...) {...}declaration across all packages (sdk,ui,hooks, and the wallet adapters).119 conversions across 87 files.
What changed
export const foo = (...) => {...}→export function foo(...) {...}<T,>→<T>), and explicit-return-type variants handledreturnexport const Foo: FC<Props> = ({...}) => {...}) →export function Foo({...}: Props) {...}, with the now-unusedFC/FunctionComponentimport removed (kept where non-exported helpers in the same file still reference it)Left untouched
Non-exported arrow consts,
forwardRef/memocomponents, object/value consts, and default exports.Behavior preservation
Arrow functions and function declarations differ in
this/argumentsbinding, constructor usage, andprototype/new.target. Verified none of these apply:this— not referenced in any of the 87 changed files (word-boundary search)arguments— not referenced in any of the 87 changed filesnew), and.prototype/new.targetare not referencedHoisting differs (TDZ vs hoisted) but is harmless for module-level exports. The conversion is therefore behavior-preserving.
Verification
ErrorStep.tsx/DepositAddressModalRenderer.tsx), not introduced by this refactor🤖 Generated with Claude Code