Follow me or this blog on:

Found 2 posts with typescript tag:

12 min read

For some reason, I always limited myself to using either Prism.js or highlight.js for code highlighting, and recently I've learned of Shiki, a better (but much heavier) highlighter, and decided to try it out. It uses the same engine and grammars to parse code as VS Code, so it'd go really well with the VS Code theme I've been using!

In this post I'll compare TypeScript support specifically of the three mentioned highlighters and highlight some issues in them. I've also implemented switching between highlighters in my code blocks, so you'll be able to see how each one performs right here in this post!

7 min read

Recently I've discovered some interesting information about the empty object type, {}, and some weird features and tricks that it provides. It's not "just an empty object literal" as some might think, and there are several very interesting and useful ways of utilizing its unique properties, that you could use in many different scenarios.