VSCode JSDoc type checking The 2019 Stack Overflow Developer Survey Results Are InFile types...
How to save as into a customized destination on macOS?
Why can Shazam fly?
Why isn't airport relocation done gradually?
Do these rules for Critical Successes and Critical Failures seem Fair?
How to answer pointed "are you quitting" questioning when I don't want them to suspect
Why hard-Brexiteers don't insist on a hard border to prevent illegal immigration after Brexit?
What does Linus Torvalds mean when he says that Git "never ever" tracks a file?
What does "fetching by region is not available for SAM files" means?
Why is the maximum length of OpenWrt’s root password 8 characters?
A poker game description that does not feel gimmicky
Earliest use of the term "Galois extension"?
Is this app Icon Browser Safe/Legit?
How technical should a Scrum Master be to effectively remove impediments?
Why isn't the circumferential light around the M87 black hole's event horizon symmetric?
Why do we hear so much about the Trump administration deciding to impose and then remove tariffs?
Can a rogue use sneak attack with weapons that have the thrown property even if they are not thrown?
How to type this arrow in math mode?
Why did Acorn's A3000 have red function keys?
Is a "Democratic" Oligarchy-Style System Possible?
Time travel alters history but people keep saying nothing's changed
Deal with toxic manager when you can't quit
Can you compress metal and what would be the consequences?
Can a flute soloist sit?
Is there a symbol for a right arrow with a square in the middle?
VSCode JSDoc type checking
The 2019 Stack Overflow Developer Survey Results Are InFile types VSCode could displayRemove debugbar in VSCodeUse a Font in VSCodeDisable VSCode code completion for stuff like AudioProcessingEventVSCode generates Icon fileHow to use JavaScript in VSCodeSyntax highlighting JS objects [VSCode]VSCode: Way to see what extensions are doing what?How to exclude files from outside my workspace from ESLint in VSCode?VScode: 'updating intellisense' forever
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
In VSCode, if I write this JS file:
/** @type {number} */
let x = 10;
/** @type {string} */
let y = x;
nothing is underlined in red, and the tooltip over y simply gives let y: string. That is not what I want! I want VSCode to throw me an error, as it does in a TS file:
let x: number = 10;
let y: string = x;
In the file above, y is underlined in red and the tooltip when hovering over it gives TS2332: Type 'number' is not assignable to type 'string'
How can I achieve that? Should I tweak a VSCode setting? Should I use a particular ESLint or JSHint feature?
javascript visual-studio-code lint
New contributor
Nino Filiu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
In VSCode, if I write this JS file:
/** @type {number} */
let x = 10;
/** @type {string} */
let y = x;
nothing is underlined in red, and the tooltip over y simply gives let y: string. That is not what I want! I want VSCode to throw me an error, as it does in a TS file:
let x: number = 10;
let y: string = x;
In the file above, y is underlined in red and the tooltip when hovering over it gives TS2332: Type 'number' is not assignable to type 'string'
How can I achieve that? Should I tweak a VSCode setting? Should I use a particular ESLint or JSHint feature?
javascript visual-studio-code lint
New contributor
Nino Filiu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
In VSCode, if I write this JS file:
/** @type {number} */
let x = 10;
/** @type {string} */
let y = x;
nothing is underlined in red, and the tooltip over y simply gives let y: string. That is not what I want! I want VSCode to throw me an error, as it does in a TS file:
let x: number = 10;
let y: string = x;
In the file above, y is underlined in red and the tooltip when hovering over it gives TS2332: Type 'number' is not assignable to type 'string'
How can I achieve that? Should I tweak a VSCode setting? Should I use a particular ESLint or JSHint feature?
javascript visual-studio-code lint
New contributor
Nino Filiu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
In VSCode, if I write this JS file:
/** @type {number} */
let x = 10;
/** @type {string} */
let y = x;
nothing is underlined in red, and the tooltip over y simply gives let y: string. That is not what I want! I want VSCode to throw me an error, as it does in a TS file:
let x: number = 10;
let y: string = x;
In the file above, y is underlined in red and the tooltip when hovering over it gives TS2332: Type 'number' is not assignable to type 'string'
How can I achieve that? Should I tweak a VSCode setting? Should I use a particular ESLint or JSHint feature?
javascript visual-studio-code lint
javascript visual-studio-code lint
New contributor
Nino Filiu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Nino Filiu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Nino Filiu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked yesterday
Nino FiliuNino Filiu
1034
1034
New contributor
Nino Filiu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Nino Filiu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Nino Filiu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
There is a VSCode setting for that:
- Open the settings (File > Preferences > Settings, shortcut Ctrl+,)
- Make sure the
Javascript > Implicit project config > Check JSoption has been checked
New contributor
Nino Filiu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Nino Filiu is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1423156%2fvscode-jsdoc-type-checking%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
There is a VSCode setting for that:
- Open the settings (File > Preferences > Settings, shortcut Ctrl+,)
- Make sure the
Javascript > Implicit project config > Check JSoption has been checked
New contributor
Nino Filiu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
There is a VSCode setting for that:
- Open the settings (File > Preferences > Settings, shortcut Ctrl+,)
- Make sure the
Javascript > Implicit project config > Check JSoption has been checked
New contributor
Nino Filiu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
There is a VSCode setting for that:
- Open the settings (File > Preferences > Settings, shortcut Ctrl+,)
- Make sure the
Javascript > Implicit project config > Check JSoption has been checked
New contributor
Nino Filiu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
There is a VSCode setting for that:
- Open the settings (File > Preferences > Settings, shortcut Ctrl+,)
- Make sure the
Javascript > Implicit project config > Check JSoption has been checked
New contributor
Nino Filiu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Nino Filiu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
answered yesterday
Nino FiliuNino Filiu
1034
1034
New contributor
Nino Filiu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Nino Filiu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Nino Filiu is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
Nino Filiu is a new contributor. Be nice, and check out our Code of Conduct.
Nino Filiu is a new contributor. Be nice, and check out our Code of Conduct.
Nino Filiu is a new contributor. Be nice, and check out our Code of Conduct.
Nino Filiu is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1423156%2fvscode-jsdoc-type-checking%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown