Fix bug: Get mapped location of definition for findAllReferencesFull#27113
Fix bug: Get mapped location of definition for findAllReferencesFull#271131 commit merged intomasterfrom
Conversation
|
I think @uniqueiniquity was having some trouble in related scenarios. |
|
@amcasey I did, but I'm not sure whether I had my project configured correctly or not. |
| initialLocation: TLocation, | ||
| projectService: ProjectService, | ||
| cb: (where: ProjectAndLocation<TLocation>, getMappedLocation: (project: Project, location: sourcemaps.SourceMappableLocation) => boolean) => void, | ||
| cb: CombineProjectOutputCallback<TLocation>, |
There was a problem hiding this comment.
Personally, I find it confusing that some callers pass a callback with a different goal (tryAddToTodo) and no intention of returning. Maybe the return type should also be a type parameter?
There was a problem hiding this comment.
You mean no intention of using the return value of getMappedLocation? Though every caller uses the return type of at least to test whether there was something added. It's true that they use it like a boolean but I don't think there's a type-safe way to have the return value be a type parameter that's either boolean or sourcemaps.SourceMappableLocation | undefined.
Fixes #26175