Hacker News new | ask | show | jobs
by fenomas 1038 days ago
Worth noting that you can also do this from plain .js files.

    /** @param { import('./foo.js').SomeType } arg */
    function doThing(arg) {
        // ...
    }
The thing being imported can be a JS thing like an exported class, or a JSDoc type that's defined with @typedef.