typescript-go
typescript-go copied to clipboard
Go-to-def on object literal shorthand misbehaves
With:
interface Something {
foo: string;
}
function makeSomething(foo: string): Something {
return { foo };
}
Go-to-def on foo in the object literal goes to the name in the object literal, as opposed to the parameter or even the foo in Something. (I can't recall which is correct. Both?)
The correct behavior is to return both the parameter and the interface property; checked against tsserver.