3 ms·
Worth noting that you can also do this from plain .js files. /** @param { import('./foo.js').SomeType } arg */ function doThing(arg) { // ...
by fenomas 3y 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.