You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typeProps={foo: string};typeDemo={props: Props;}&{props: Props;};typeCollection={demo: Demo;}&{demo: Demo;};constt1: Collection={demo: {props: {foo: 'foo',bar: 1,// expected error due to excess prop, but got none β},},};
If we remove one of the intersections, excess property checks kick in again.
This is clearly a contrived example however I have reduced it from a much more complicated example where we do actually need to use intersections in a similar way. I can elaborate if needed.
I have been able to workaround the issue using this Compact helper:
typeCompact<A>=AextendsFunction ? A : {[KinkeyofA]: A[K]}&{};typeCollection=Compact<{demo: Demo;}&{demo: Demo;}>;
π Actual behavior
See comment in code above.
π Expected behavior
See comment in code above.
The text was updated successfully, but these errors were encountered:
Bug Report
π Search Terms
π Version & Regression Information
β― Playground Link
Playground link with relevant code
π» Code
If we remove one of the intersections, excess property checks kick in again.
This is clearly a contrived example however I have reduced it from a much more complicated example where we do actually need to use intersections in a similar way. I can elaborate if needed.
I have been able to workaround the issue using this
Compact
helper:π Actual behavior
See comment in code above.
π Expected behavior
See comment in code above.
The text was updated successfully, but these errors were encountered: