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;
}







0















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?










share|improve this question







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.



























    0















    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?










    share|improve this question







    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.























      0












      0








      0








      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?










      share|improve this question







      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






      share|improve this question







      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.











      share|improve this question







      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.









      share|improve this question




      share|improve this question






      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.






















          1 Answer
          1






          active

          oldest

          votes


















          0














          There is a VSCode setting for that:




          1. Open the settings (File > Preferences > Settings, shortcut Ctrl+,)

          2. Make sure the Javascript > Implicit project config > Check JS option has been checked






          share|improve this answer








          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.





















            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.










            draft saved

            draft discarded


















            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









            0














            There is a VSCode setting for that:




            1. Open the settings (File > Preferences > Settings, shortcut Ctrl+,)

            2. Make sure the Javascript > Implicit project config > Check JS option has been checked






            share|improve this answer








            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.

























              0














              There is a VSCode setting for that:




              1. Open the settings (File > Preferences > Settings, shortcut Ctrl+,)

              2. Make sure the Javascript > Implicit project config > Check JS option has been checked






              share|improve this answer








              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.























                0












                0








                0







                There is a VSCode setting for that:




                1. Open the settings (File > Preferences > Settings, shortcut Ctrl+,)

                2. Make sure the Javascript > Implicit project config > Check JS option has been checked






                share|improve this answer








                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:




                1. Open the settings (File > Preferences > Settings, shortcut Ctrl+,)

                2. Make sure the Javascript > Implicit project config > Check JS option has been checked







                share|improve this answer








                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.









                share|improve this answer



                share|improve this answer






                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.






















                    Nino Filiu is a new contributor. Be nice, and check out our Code of Conduct.










                    draft saved

                    draft discarded


















                    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.




                    draft saved


                    draft discarded














                    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





















































                    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







                    Popular posts from this blog

                    Cannot install PyQt5 The Next CEO of Stack OverflowCannot install tcpreplay 3.4.4cannot...

                    Kapp-Putsch Acontecimentos | Outros artigos | Menu de navegação

                    Why did early computer designers eschew integers? The Next CEO of Stack OverflowWhat register...