I am using VScode version 1.57.
The issue is that it Simply cant not navigate to the definition, "Go To definition" not working.
as you can see in an image it does not exists.
What I have tried:
simply need to navigate to definition, I searched through documentation of VSCode it must read Javascrit files, I even added jsx and js next to ts, tsx but in this simple example below it still does not work.
Your import is importing the entire ./test.js
file as the variable sum
thus there is no single method definition as you are expecting.
If you want sum to be your actual function called sum
you need to change your import
statement to:
import { sum } from './test'
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.