Getting Started With Testing Types in TypeScript | by Nic Jennings | Aug, 2022

A guide on testing advanced types such as Generics or Conditional Types in TypeScript Source As soon as you start writing more advanced types such as Generics or Conditional Types in TypeScript then it should become a crucial step in checking that your type is doing exactly what you expect. Testing Types is a little … Read more

Bun – What Can I Use It For?

In recent years, the web development landscape has discovered that, while super stylized websites and web applications with tons of very rich interactions made with Javascript be appealing to users, the loading time of the page can be a hundred times more influential to the user’s perspective of the experience. As a result, there has … Read more

Developing Reusable and Customizable Modals With React and TypeScript | by L Javier Tovar | Aug, 2022

How to make a complete modal with React Portals and styled-components Photo by Vincent Giersch on Unsplash As a frontend developer, you have probably had to build a modal window on more than one occasion. This type of element differs from the typical pop-ups because it does not appear automatically, but it is the user … Read more

How Use ESLint to Write Elegant Code in JavaScript and TypeScript | by Lynn Kwong | Aug, 2022

Improve your JS/TS code quality using ESLint Photo by Hunters Race from Unsplash JavaScript has a very flexible syntax by default. You can change the type of a variable, use single and double quotes for strings, have any number of spaces for indentation, omit the trailing semicolons, etc. However, only letting a project work is … Read more

Creating a Singleton in TypeScript | by Steve Hankin | Aug, 2022

A classless object approach to a well-known pattern — from JavaScript to TypeScript Photo by Shubham Dhage on Unsplash Often the design patterns are translated to JavaScript using the ES6 Class declaration, perhaps for a couple of reasons: Popular definitions¹ of design patterns use the class keyword Java proliferates, and it is trivial to transfer … Read more

The Ultimate Clean Architecture Template for TypeScript Projects | by Aziz Nal | Aug, 2022

A guide on creating a layer-based TypeScript project template following the principles of clean architecture Photo by Max Langelott on Unsplash Table of ContentsIntroWhat is clean architectureA Detailed Implementation GuideCreate your project directories and rootConfiguring Core, Data, and DISetting up the mono repo configurationSetting up dependencies between packagesHow do I use this masterpiece of a … Read more

Build a Dapp Using Next.js, Typescript, Wagmi, and the Coinbase Wallet SDK | by Michael Bogan | Aug, 2022

Onboarding new users with Coinbase wallet Cover image Web3 represents an exciting chapter in the development of the internet. The primitives that the blockchain provides will lead to an infinite number of applications and use cases. We’ve seen the explosion of ICOs, DeFi, NFTs, and peer-to-peer payment systems. However, we still have a long way … Read more

Typescript: deep keyof of a nested object

UPDATE for TS4.1 It is now possible to concatenate string literals at the type level, using template literal types as implemented in microsoft/TypeScript#40336. The below implementation can be tweaked to use this instead of something like Cons (which itself can be implemented using variadic tuple types as introduced in TypeScript 4.0): type Join<K, P> = … Read more

node.js – I can’t build a docker image error with typescript

Hi I can’t build a docker image using the docker build . in next.js app Receive an error error: failed to solve: process “/bin/sh -c yarn run build” did not complete successfully: exit code: 1 Error: buildx failed with: error: failed to solve: process “/bin/sh -c yarn run build” did not complete successfully: exit code: … Read more

Device Detection in TypeScript. An easier way to test your app’s… | by Adrien Miquel | Jul, 2022

An easier way to test your app’s compatibility Amongst many aspects of web development, device detection looks quite easy. Reading User Agent provides lots of information about the context of browsing. Thanks to this informational string and appropriate Regular Expressions, you can retrieve the device kind, its operating system, and much more. Working with TypeScript … Read more