Skip to content

Conversation

@gwagjiug
Copy link

Summary

Replaced the use of any in the rewrite function of loadConfig with a safer type definition:
PackageJson & Record<string, unknown>.

Details

  • Previously, pkg was typed as any, which bypassed TypeScript's type checking and could lead to unsafe property access.
  • Updated to PackageJson & Record<string, unknown>:
    • PackageJson provides type safety for standard package.json fields.
    • Record<string, unknown> allows custom fields to be safely accessed.
  • As a result, we maintain both flexibility (supporting custom config fields) and type safety.

Why

This change removes unsafe any usage while keeping compatibility with user-defined fields in package.json, ensuring more reliable type checks and better developer experience.

@vercel
Copy link

vercel bot commented Aug 28, 2025

@gwagjiug is attempting to deploy a commit to the Toss Team on Vercel.

A member of the Team first needs to authorize it.

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.

1 participant