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
I expected ExtractedAdditionalContext to be AdditionalContext or { customValue: string }, and for test1 to compile without error.
π Expected behavior
ExtractedAdditionalContext is AdditionalContext & BaseContext<Config> which is the same type as Context. test1 results in a compiler error of:
Type 'AdditionalContext' is not assignable to type 'AdditionalContext & BaseContext<Config>'.
Type 'AdditionalContext' is missing the following properties from type 'BaseContext<Config>': foo, config
Additional notes
When I remove the config property from BaseContext the issue is resolved.
Bug Report
π Search Terms
infer, conditional type, generic, alias
π Version & Regression Information
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
I expected
ExtractedAdditionalContextto beAdditionalContextor{ customValue: string }, and fortest1to compile without error.π Expected behavior
ExtractedAdditionalContextisAdditionalContext & BaseContext<Config>which is the same type asContext.test1results in a compiler error of:Additional notes
When I remove the
configproperty fromBaseContextthe issue is resolved.