Roman Veselý Software Engineer from Slovakia. Somewhere between trees and bytes of code.

Log #0036

Wouldn’t it be helpful to see type hints in JavaScript configuration files? Let’s say, for Rollup configuration, so you have at least a glance of all the possibilities?

Thankfully it can be done with JSDoc @type tag! Example:

// rollup.config.js

/** @type {import('rollup/dist/rollup').RollupOptions[]} */
export default [
  {
    input: "./index.js",
    // ...
  },
];

I think that’s really neat!