DOPΣ - what to add here in plated hole, i updat...
what to add here in plated hole, i updated circuit-json

21 Replies
it should be holeOffsetX and holeOffsetY
idk why there's a pcbHoleOffsetX etc. that's just wrong
maybe there was a bad PR merged at some point that was later fixed
should i go with this?

ideally no, because that would break the code that handles hole offset
do you have an old version of props?
try
bun i
or even update to the latest version of propsupdated props, still no prop like that

CC @Abse what is going on here
CC @Rishabh idk who knows about hole offsets
GitHub
support for circuitjson footprint by ArnavK-09 · Pull Request #136...
related tscircuit/tscircuit#768
@DOPΣ it's listed https://github.com/tscircuit/props/blob/6f1ff28e992b0624ce552d6961317159b80558cf/lib/components/platedhole.ts#L64
GitHub
props/lib/components/platedhole.ts at 6f1ff28e992b0624ce552d6961317...
Prop definitions for tscircuit components. Contribute to tscircuit/props development by creating an account on GitHub.
maybe you need to cast the props?
(props as PlatedHoleProps) or something?
what is going on ?
I changed the props from pcbHoleOffset to holeOffset
there was a pcbHoleOffset before
Yup, I changed in one place
But on another place there is nothing like props.offsrt anything
That 0,0 place
where
See this pr diff
and there is no prop.holeOffsetX ?
props looks good to me
let me double check
lgtm
wait even if I updated props in core I still can't get the props.HoleOffset ?
same issue

it seems like
props
might be losing it's typeso how can we fix this ?
it seems like the type narrowing for props is causing the issue
so it's a regular like "don't forget to narrow"
so what should we do
there are a couple ways to solve type narrowing, but it requires more context. For some reason, typescript doesn't know the type of props
there might also be a mistake in the props definition