My name is Ikechukwu Charles. I am a Front-end web developer. I really love honing my skills to the extent that I started writing my own Javascript UI library from scratch, and playing basketball.
Very inspiring post. Just tried out the jsdoc comments in my editor right now. The intellisense and type inference both work fine but it does not throw an error when I assign a string type to a number type.
Here is what I mean:
/**
* @param {number} a
*/functionreturnNumber(a){returna+2;}returnNumber('a');
As you know, if I wrote the code above in typescript I would get an error right away, but it doesn't work when I do it in Javascript using jsdoc.
You still have to configure your project to use typescript, or enable it globally in your IDE. There's a good post about setting up this way of working linked above in the post itself :)
My name is Ikechukwu Charles. I am a Front-end web developer. I really love honing my skills to the extent that I started writing my own Javascript UI library from scratch, and playing basketball.
Very inspiring post. Just tried out the jsdoc comments in my editor right now. The intellisense and type inference both work fine but it does not throw an error when I assign a string type to a number type.
Here is what I mean:
As you know, if I wrote the code above in typescript I would get an error right away, but it doesn't work when I do it in Javascript using jsdoc.
Anyway, thanks for the post. It was really good
You still have to configure your project to use typescript, or enable it globally in your IDE. There's a good post about setting up this way of working linked above in the post itself :)
I tried what I saw in the link and it works very well. Thanks alotπ .
Great :) I was just setting up this for you: github.com/thepassle/uh-oh-typescript