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
functiongenerate(who: string): {json: true,body: {hello: string}}|{json: false,body: string}{return{json: true,body: {hello: who}}}const{body, json}=generate('world');if(json){body// should give you auto-complete, for `.hello`}else{body// should be a string, thus giving `includes` as an example}
Issue
As you'll find from the code example, body on line 8 doesnt autocomplete with .hello
Sometimes issues are academic speak that I have no clue if it's even the same thing! Thanks for the "duplicate" advice, I shall subscribe to that issue. Maintainers feel free to close this perhaps.
TypeScript Version: 4.1.0-beta
Code
Issue
As you'll find from the code example,
body
on line 8 doesnt autocomplete with.hello
Compiler Options
Playground Link: Provided
The text was updated successfully, but these errors were encountered: