DEV Community

Cover image for Best tip for GoLang programmers learning TypeScript
Ayrton Fidelis
Ayrton Fidelis

Posted on

Best tip for GoLang programmers learning TypeScript

I've been playing with GoLang recently, pretty cool language actually, but comming from a TypeScript world it was quite weird to me to use the nil keyword instead of null. I figured out that it could also be weird for Go devs learning TS, so here goes a little something to make the transition smoother:


const nil = null;

Enter fullscreen mode Exit fullscreen mode

With that in place, Go devs are now able to use the familiar keyword instead of the longer alternative.

Top comments (1)

Collapse
 
avantar profile image
Krzysztof Szala

Finally some high quality content on dev.to 😂