TypeScript 4.2 was recently released, with many cool new features and improvements. It’s really impressive to see how TypeScript improves the developer experience one step at a time.
In this short post we will focus one feature, called Smarter Type Alias Preservation. I can say for myself that I really anticipate this feature. In a nutshell, it improves error messages related to union-types of union-types. I hope that in a few minutes you’ll understand better what it means, and why it is useful.
This post was originally published in dev.to
In most cases, it’s hard to analyze what’s the status of the migration:
In an attempt to help with such questions, I’ve recently published a small utility called Git…
At Testim.io we care about code quality and UX. For this reason, we use various tools that make development easier and more accurate. Among others, we use Stylelint to lint our SCSS and CSS files. One of the powerful features of stylelint is the ability to add rules of your own, which will fit your project’s needs. While stylelint provides an API for adding custom rules, it can be a bit confusing when doing so for the first time.
In this blog post, we will go through the steps for adding a new custom stylelint rule to your project:
I’ve started working at Testim recently. We have an amazing tool which gives you the power to create stable end-to-end tests quickly.
Testim has just launched an awesome new (free) tool that will help you write functional tests faster. The Playground enables you to record tests and then copy the code that can run on your Playwright testing framework.
Check it out on Product Hunt!
The following scenario should be familiar to most developers: You look for a utility function in an existing project. Quickly you find it and realize it is private, so you can’t use it in your class. Assuming you won’t copy-paste the function, a refactor is required. Extracting the function to a new designated class seems like the best solution.
One question remains — how will you extract the function?
The first option is a static function in a new class. The second option, assuming you use any dependency injection framework (e.g. Guice), is an injectable instance of a new, non-static…
This September (2019), I attended CSSConf and JSConf in Budapest. Both conferences were single-tracked, with a total of 39 amazing talks. It was an incredible experience, and I learned many new things. Below, I’ve listed my top 9 favourite talks, in chronological order as they were presented in the conferences, together with explanations and recommendations.
So here goes!
Giulia spoke about creating drawings and games using only CSS and HTML. She mentioned how…
High chances are you got to this post through some link sharing.
High chances are the link had some preview: the post header, a short summary, and an image as well.
Even higher chances that it’s not the first time you have seen such preview.
Ever wondered what generates these previews, or how can you start using them? I hope I’ll answer some of your questions in the post.
For those of you who are still wondering what previews I’m referring to, here are some examples:
Recently, I’ve learned about a useful TypeScript operator: The non-null assertion operator. It negates null and undefined types from variables.
In this post, I will explain how and when to use this operator and give some examples of where it can help you.
TL;DR: Adding an exclamation mark after a variable will ignore undefined or null types.
The non-null assertion operator takes a typed variable and removes the undefined and null types from it.
Using the operator is as simple as adding an exclamation mark.
undefined | nulltypes:
2. Ignore an
undefined type when…
Recently, I discontinued my work on a side project I’ve started 18 months ago.
Doesn’t sound like a big success story, right? I thought so too.
But looking back, I realize that I learned a lot of things, techniques and tools that will help me next time I’ll start a side project. In this post, I've gathered some of the methods and conclusions from the past year and a half.
If you want to start working on a side project, or willing to become more efficient — this post can help you.
If you’re the TL;DR type, you can find…
Importing a legitimate library has recently broken our production bundle, by introducing a “Syntax Error” exception. This short article describes the error and the investigation process that led us to the solution. I hope that at some point, someone will be able to save precious time by referring this post.
TL;DR When bundling in production mode with Webpack v4, TerserPlugin minifies the bundle, which can sometimes corrupt an already-minified 3rd party bundle. Adding the option keep_fnames: /./ will solve this problem without increasing the bundle size.
Frontend lover ❤️ Tooling enthusiastic 🛠️ React / TypeScript clean-coder ⚛️ 🧼