I have a store object that contains two separate object types as properties. TypeScript only considers the overlapping properties of each type as valid Parts.
TypeScript is throwing a "Argument of type '"invert"' is not assignable to parameter of type 'Part<type1 | type2, "channel" | "role" | "value">'." error for what appears to be valid code.
Describe the bug
I have a store object that contains two separate object types as properties. TypeScript only considers the overlapping properties of each type as valid Parts.
TypeScript is throwing a "
Argument of type '"invert"' is not assignable to parameter of type 'Part<type1 | type2, "channel" | "role" | "value">'.
" error for what appears to be valid code.The provided example runs without issue.
Your Example Website or App
https://stackblitz.com/edit/solidjs-templates-xgprfg?file=src%2FApp.tsx
Steps to Reproduce the Bug or Issue
Expected behavior
From what I understand the Part type should be:
Part<type1 | type2, "channel" | "role" | "value" | "present" | "invert">
but instead it is being interpreted as:
Part<type1 | type2, "channel" | "role" | "value">
Is there some way to define the Part more narrowly at the component level?
Screenshots or Videos
No response
Platform
Additional context
No response