Skip to content

Conversation

@seveibar
Copy link
Contributor

@seveibar seveibar commented Jul 7, 2025

Summary

  • add a tqfp footprint implementation
  • export tqfp in footprint index and builder
  • test TQFP footprint and update footprint name test
  • update zod to latest version

Testing

  • BUN_UPDATE_SNAPSHOTS=1 bun test tests/tqfp.test.ts
  • bun test tests/get-footprint-names.test.ts
  • bun run format

https://chatgpt.com/codex/tasks/task_b_686b0dfed6a0832e8f30a12d94ec01f7

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: TypeScript Definition Mismatch Causes Runtime Errors

The tqfp function has a parameter interface mismatch. Its TypeScript definition declares parameters ('h', 'pl', 'pw') that are incompatible with its implementation, which directly calls qfp. The qfp function expects a different set of parameters ('p', 'id', 'od', 'wide', 'narrow'). This inconsistency, caused by tqfp_def reusing qfp_def, leads to runtime validation errors when tqfp is called with parameters valid by its type but not supported by qfp.

src/fn/tqfp.ts#L4-L10

export const tqfp_def = qfp_def
export const tqfp = (
raw_params: z.input<typeof tqfp_def>,
): { circuitJson: AnyCircuitElement[]; parameters: any } => {
return qfp(raw_params)

src/footprinter.ts#L114-L115

lqfp: (num_pins?: number) => FootprinterParamsBuilder<"w" | "h" | "pl" | "pw">
tqfp: (num_pins?: number) => FootprinterParamsBuilder<"w" | "h" | "pl" | "pw">

Fix in CursorFix in Web


BugBot free trial expires on July 22, 2025
You have used $0.00 of your $50.00 spend limit so far. Manage your spend limit in the Cursor dashboard.

Was this report helpful? Give feedback by reacting with 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants