Closed
Description
Bug Report
π Search Terms
find all references
typechecking difference
π Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about "Common "Bugs" That Aren't Bugs"
β― Playground Link
π» Code
// inferOptions.ts
export declare function inferOptions<D>(
options: {
data: () => D;
created: () => void;
} & ThisType<D>
): void;
// test.js
import { inferOptions } from "./inferOptions";
inferOptions({
data() {
return {
time: 0, // click `find all references` here output 2 results but expect 3.
};
},
created() {
this.time = 123; // here is the missing one
console.log(this.time);
},
});
π Actual behavior
find all references
for this.name
output 2 results in .js
file but 3 results in .ts
file.
π Expected behavior
find all references
for this.name
output 3 results in both .js
and .ts