• Home
  • Books
  • Node
  • Testing
  • JavaScript
  • More...
  • Search
  • About
  • Gear & Setup

TypeScript

A collection of 5 posts

#performance #typescript #node #javascript

Taming Timezones: Replacing moment.parseZone with @date-fns/tz and Vanilla JS Date

Taming Timezones: Replacing moment.parseZone with @date-fns/tz and Vanilla JS Date How we preserved timezone-aware parsing when migrating from moment.js to date-fns and JS Date. One of the last pieces of work I completed at my last workplace was to migrate a core system from mome ...

  • Hugo Di Francesco
    Author
6 min read
#typescript

TypeScript in the Trenches: Utility types and type manipulation patterns for application development

7 advanced types and patterns that I’ve used as part of TypeScript application development. These patterns help unlock new levels of type safety and maintainability in TypeScript. ...

  • Hugo Di Francesco
    Author
5 min read
#javascript #typescript

What is the "?." JavaScript/TypeScript operator

In JavaScript and TypeScript, the “?.” operator is called optional chaining. It works in a similar fashion to the . (chaining) operator, except that it short-circuits instead of causing an error when a value is null or undefined. That means const obj = {}; console.log ...

  • Hugo Di Francesco
    Author
2 min read
#javascript #jsdoc #typescript #node

How to get type-checking and generate TypeScript Typing declaration (types.d.ts) from JSDoc annotations

How to achieve TypeScript-like behaviour in Vanilla JavaScript using JSDoc and @ts-check in VSCode: that’s the purpose of this post. TypeScript is a JavaScript superset with types. It solves one of the big problems with JavaScript, which is “what parameters does this ...

  • Hugo Di Francesco
    Author
5 min read
#node #javascript #typescript

Use microbundle for a TypeScript npm module

For those looking to write a package and publish it to npm, TypeScript + microbundle is a low-friction way to build a high-quality library. I’ve created a GitHub repository template with microbundle, TypeScript, ava and xo. You can find it at github.com/HugoDF/microbundle-t ...

  • Hugo Di Francesco
    Author
4 min read
Page 1 of 1 

Interested in Alpine.js?

Power up your debugging with the Alpine.js Devtools Extension for Chrome and Firefox. Trusted by over 15,000 developers (rated 4.5 ⭐️).

Install Now close
Code with Hugo
Latest Posts Github