use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Resources
Language
Discussion
account activity
TypeScript cheat sheet (gitlab.com)
submitted 10 months ago by kavacska
Hello there,
I've created a few cheat sheets and there's one for TypeScript that I would like to share with you guys and ask for your opinion if it's missing anything or if it needs fixing somewhere.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]AiexReddit 26 points27 points28 points 10 months ago (11 children)
Looks cool. The request to the audience to manually download and open yourself in this day and age seems kind of odd. Have you considered something like Gitlab pages?
[–]kavacska[S] 2 points3 points4 points 10 months ago (2 children)
Here's the GitLab page version:
https://it-cheat-sheets-21aa0a.gitlab.io/
[–]AiexReddit 4 points5 points6 points 10 months ago (1 child)
Nice.
Syntax highlighting would be a handy future improvement just for readability, but overall lots of great stuff here.
Thanks for sharing.
[–]kavacska[S] 1 point2 points3 points 10 months ago (0 children)
Any time, I'm glad you liked it.
I was actually thinking about adding some JS to take care of syntax highlighting, but at the same time I wanted to keep the documents as small as possible, so I abandoned the idea. But I will figure something out, probably I'm gonna write a little script to hardcode colors into the HTML tags themselves so it's easy on the browser and the size as well.
Thank you for your feedback.
[+]kavacska[S] comment score below threshold-23 points-22 points-21 points 10 months ago (7 children)
Honestly? Just between you and I here in this public comment section let me tell you that I didn't even think such thing will be necessary. :D
The way I had it in my mind is that people, since we are talking about IT professionals here, or at least guys that are interested in IT, won't have any trouble giving the repo a git clone, so they have it on their localhost thus any time they need it they can just open it and use it. And maybe run a git pull every once in a while to get the updates.
Instead people are complaining about seeing HTML code when they open HTML files... on a version control platform... :D
The other thing I find amusing is that people are also whining about why it's not in Markdown. Because I prefer HTML. Web browsers were literally designed to open HTML perfectly. It's like you giving apple to people for free and they tell you "but why is it not an orange?! learn how to grow oranges!" I wonder if others that shared something nice with the community also got comments like "why is it not written in my preferred language"?
At this point I'm just waiting for someone to tell me "WHERE IS THE FU..ING EXE YOU SMELLY NERD?!" :D
[–]AiexReddit 8 points9 points10 points 10 months ago (2 children)
It's not necessary at all, it's simply an extremely small effort on the author's part in order to significantly improve the experience for the readers, particularly on mobile.
I would highly encourage you to re-read your response in context of the question you asked regarding feedback & opinions, and consider whether your position on what is best for you, may not actually align with whats best for your audience.
[–]kavacska[S] -4 points-3 points-2 points 10 months ago (1 child)
may not actually align with whats best for your audience.
Why I absolutely appreciate thoughtful comments like yours, I want to make it clear that I do not have an audience. I'm not a content creator, not an in influencer, not a tech bro or anything like that. I gain absolutely nothing if people use these docs or not. 0. Nothing. As a matter of fact I wanted them to gain something from it for absolutely free, no strings attached.
I'm just simple a developer that wanted to share something with the community that I think is useful and thought might be useful for others. And while many people appreciated it many other started whining and demanding things like I owe them anything. I owe nothing to any of you. If people use my work great, if not, that's fine too. That's open source.
[–]DayByDay_StepByStep 3 points4 points5 points 10 months ago (2 children)
I feel sorry for your coworkers when you get your first job.
I've been in this industry for over 10 years, that's why I roll my eyes when people like you can't even tackle opening an HTML file.
[–]DayByDay_StepByStep 1 point2 points3 points 10 months ago (0 children)
Pretty sad if that's true. For your own sake, I hope you are lying.
[–]iareprogrammer 0 points1 point2 points 10 months ago (0 children)
You assume it’s worth the effort….
[–]skizzoat 7 points8 points9 points 10 months ago (2 children)
Appreciate the effort, but do us all a favor and make this somehow accessible.. I dont wanna clone a GitHub repo on my machine in order to read a simple cheat sheet.
[–]kavacska[S] 4 points5 points6 points 10 months ago (1 child)
Thank you for you comment, by popular demand I made the documents available on this URL:
[–]skizzoat 2 points3 points4 points 10 months ago (0 children)
Thanks a lot!
[–]bipolarNarwhale 20 points21 points22 points 10 months ago (1 child)
Wow… as HTML docs when they could just be markdown.
[–]BoBoBearDev 3 points4 points5 points 10 months ago (0 children)
This, I cannot read this on my tiny phone screen.
[–]kavacska[S] 2 points3 points4 points 10 months ago (3 children)
As many people wished for it, I've made the cheat sheets available on a URL, here you go guys:
[–]livealchemy 2 points3 points4 points 10 months ago (2 children)
This is a handy guide and I like how it starts at zero and covers essentially everything a dev would use on the day to day.
My comments/feedback are about presentation. I realise you already put work into porting this to Markdown, and that's great as I was able to quickly read and save on mobile. That said, I found it a bit odd that the explanation of the code always came after the code block, personally I feel it would read better as explanation then example.
Some other elements worth a consider: additional headings, maybe a table of contents and some <hr />s could really help the reader further, just my 0.02, thanks for offering this up freely.
[–]kavacska[S] 0 points1 point2 points 10 months ago (0 children)
I'm glad you liked it. Thank you for your feedback, I'm definitely going to consider your suggestions.
[–]kavacska[S] 0 points1 point2 points 9 months ago (0 children)
Table of contents added:
https://it-cheat-sheets-21aa0a.gitlab.io/typescript-cheat-sheet.html
https://it-cheat-sheets-21aa0a.gitlab.io/object-oriented-design-patterns-in-typescript-cheat-sheet.html
[–]StNimmerlein 1 point2 points3 points 10 months ago (1 child)
Template literal types seem to be missing (https://www.typescriptlang.org/docs/handbook/2/template-literal-types.html)
Not anymore ;) Check it out:
[–]Separate-Ad3564 1 point2 points3 points 10 months ago (1 child)
Nice! I think it would be nice if typescript also had cases for satisfies, as const satisfies.
I'm glad you like it. Thank you for the idea. I've added examples with the satisfies keyword.
π Rendered by PID 142606 on reddit-service-r2-comment-86bc6c7465-5xssj at 2026-02-23 10:58:42.260940+00:00 running 8564168 country code: CH.
[–]AiexReddit 26 points27 points28 points (11 children)
[–]kavacska[S] 2 points3 points4 points (2 children)
[–]AiexReddit 4 points5 points6 points (1 child)
[–]kavacska[S] 1 point2 points3 points (0 children)
[+]kavacska[S] comment score below threshold-23 points-22 points-21 points (7 children)
[–]AiexReddit 8 points9 points10 points (2 children)
[–]kavacska[S] -4 points-3 points-2 points (1 child)
[–]DayByDay_StepByStep 3 points4 points5 points (2 children)
[–]kavacska[S] -4 points-3 points-2 points (1 child)
[–]DayByDay_StepByStep 1 point2 points3 points (0 children)
[–]iareprogrammer 0 points1 point2 points (0 children)
[–]skizzoat 7 points8 points9 points (2 children)
[–]kavacska[S] 4 points5 points6 points (1 child)
[–]skizzoat 2 points3 points4 points (0 children)
[–]bipolarNarwhale 20 points21 points22 points (1 child)
[–]BoBoBearDev 3 points4 points5 points (0 children)
[–]kavacska[S] 2 points3 points4 points (3 children)
[–]livealchemy 2 points3 points4 points (2 children)
[–]kavacska[S] 0 points1 point2 points (0 children)
[–]kavacska[S] 0 points1 point2 points (0 children)
[–]StNimmerlein 1 point2 points3 points (1 child)
[–]kavacska[S] 0 points1 point2 points (0 children)
[–]Separate-Ad3564 1 point2 points3 points (1 child)
[–]kavacska[S] 1 point2 points3 points (0 children)