Without more info vscode can't know that the parameter within your function must be a string
. If you use JSDoc comments to indicate that you'll get the intellisense you expect.
/**
* @param {string} word
*/
function qweqwe(word) {
const word = word. // string intellisense here
}
In your second example:
const word = "mom";
const werwer = word.
vscode can do a good job of predicting the type of word
from the previous assignment.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…